Redistribution and use in source and binary forms, with or without modification, are permitted provided the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file cplot.c.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include "cplot.h"
Go to the source code of this file.
Data Structures | |
struct | CPLOT_structBitmapFileHeader |
The BITMAP file header struct. More... | |
struct | CPLOT_structBitmapInfoHeader |
The BITMAP file info struct. More... | |
Defines | |
#define | CPLOT_SIZEOF_BITMAPFILEHEADER (14) |
True size of disk (one byte packing required). | |
#define | CPLOT_SIZEOF_BITMAPINFOHEADER (40) |
True size of disk (one byte packing required). | |
#define | CPLOT_LARGEFONT (14) |
The width and height of CPLOT's large font. | |
#define | CPLOT_LARGEFONT_NBYTES (196) |
The number of bytes in a large font letter. | |
#define | CPLOT_SMALLFONT_HGT (7) |
The heigHt of CPLOT's small font. | |
#define | CPLOT_SMALLFONT_WIDTH (6) |
The width of CPLOT's small font. | |
#define | CPLOT_SMALLFONT_NBYTES (42) |
The number of bytes in a small font letter. | |
#define | CPLOT_PIXELS_PER_CM (38) |
The number of pixels per centimeter. | |
#define | CPLOT_POINT_SIZE (5) |
The width/height for a point [pixels]. | |
#define | CPLOT_LARGEPOINT_SIZE (8) |
The width/height for a large point [pixels]. | |
#define | CPLOT_DEFAULT_PLOT_WIDTH_CM (15) |
The default plot width [cm]. | |
#define | CPLOT_DEFAULT_PLOT_HEIGHT_CM (13) |
The default plot height [cm]. | |
Functions | |
BOOL | CPLOT_BYTE_MTX_Zero (CPLOT_structByteMatrix *dst) |
zero the entire matrix | |
BOOL | CPLOT_BYTE_MTX_Fill (CPLOT_structByteMatrix *dst, const byte value) |
fills the matrix with the given value | |
BOOL | CPLOT_PlotOptionsInit (CPLOT_structPlotOptions *Opt) |
Initialize the general plotting options. | |
BOOL | CPLOT_Init (CPLOT *P) |
Initialize the main CPLOT data container. | |
BOOL | CPLOT_SaveToFile (CPLOT *P, const char *FileName) |
Once plotting is complete, save the bitmap to the file specified. | |
BOOL | CPLOT_SetPlotOptions (CPLOT *P, CPLOT_structPlotOptions *opt) |
Set all the general plotting options. | |
BOOL | CPLOT_Plot (CPLOT *P, CPLOT_structSeries *Series) |
Plot a data series. Call this function repeatedly for each data series. |
#define CPLOT_DEFAULT_PLOT_HEIGHT_CM (13) |
#define CPLOT_DEFAULT_PLOT_WIDTH_CM (15) |
#define CPLOT_LARGEFONT (14) |
#define CPLOT_LARGEFONT_NBYTES (196) |
#define CPLOT_LARGEPOINT_SIZE (8) |
#define CPLOT_PIXELS_PER_CM (38) |
#define CPLOT_POINT_SIZE (5) |
#define CPLOT_SIZEOF_BITMAPFILEHEADER (14) |
#define CPLOT_SIZEOF_BITMAPINFOHEADER (40) |
#define CPLOT_SMALLFONT_HGT (7) |
#define CPLOT_SMALLFONT_NBYTES (42) |
#define CPLOT_SMALLFONT_WIDTH (6) |
BOOL CPLOT_BYTE_MTX_Fill | ( | CPLOT_structByteMatrix * | dst, | |
const byte | value | |||
) |
BOOL CPLOT_BYTE_MTX_Zero | ( | CPLOT_structByteMatrix * | dst | ) |
BOOL CPLOT_Init | ( | CPLOT * | P | ) |
BOOL CPLOT_Plot | ( | CPLOT * | P, | |
CPLOT_structSeries * | Series | |||
) |
BOOL CPLOT_PlotOptionsInit | ( | CPLOT_structPlotOptions * | Opt | ) |
BOOL CPLOT_SaveToFile | ( | CPLOT * | P, | |
const char * | FileName | |||
) |
BOOL CPLOT_SetPlotOptions | ( | CPLOT * | P, | |
CPLOT_structPlotOptions * | opt | |||
) |