Term-Gnuplot
view release on metacpan or search on metacpan
gradient_struct *gradient;
/* the used color model: RGB, HSV, XYZ, etc. */
int cmodel;
/* Three mapping function for gray->RGB/HSV/XYZ/etc. mapping
* used if colorMode == SMPAL_COLOR_MODE_FUNCTIONS */
struct udft_entry Afunc; /* R for RGB, H for HSV, C for CMY, ... */
struct udft_entry Bfunc; /* G for RGB, S for HSV, M for CMY, ... */
struct udft_entry Cfunc; /* B for RGB, V for HSV, Y for CMY, ... */
/* gamma for gray scale palettes only */
double gamma;
} t_sm_palette;
/* a point (with integer coordinates) for use in polygon drawing */
typedef struct {
unsigned int x, y;
#ifdef EXTENDED_COLOR_SPECS
double z;
colorspec_t spec;
#endif
} gpiPoint;
typedef struct TERMENTRY {
const char *name;
#ifdef WIN16
const char GPFAR description[80]; /* to make text go in FAR segment */
#else
const char *description;
#endif
unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic;
void (*options) __PROTO((void));
void (*init) __PROTO((void));
void (*reset) __PROTO((void));
void (*text) __PROTO((void));
int (*scale) __PROTO((double, double));
void (*graphics) __PROTO((void));
void (*move) __PROTO((unsigned int, unsigned int));
void (*vector) __PROTO((unsigned int, unsigned int));
void (*linetype) __PROTO((int));
void (*put_text) __PROTO((unsigned int, unsigned int, const char*));
/* the following are optional. set term ensures they are not NULL */
int (*text_angle) __PROTO((int));
int (*justify_text) __PROTO((enum JUSTIFY));
void (*point) __PROTO((unsigned int, unsigned int,int));
void (*arrow) __PROTO((unsigned int, unsigned int, unsigned int, unsigned int, TBOOLEAN));
int (*set_font) __PROTO((const char *font));
void (*pointsize) __PROTO((double)); /* change pointsize */
int flags;
void (*suspend) __PROTO((void)); /* called after one plot of multiplot */
void (*resume) __PROTO((void)); /* called before plots of multiplot */
void (*fillbox) __PROTO((int, unsigned int, unsigned int, unsigned int, unsigned int)); /* clear in multiplot mode */
void (*linewidth) __PROTO((double linewidth));
#ifdef USE_MOUSE
int (*waitforinput) __PROTO((void)); /* used for mouse input */
void (*put_tmptext) __PROTO((int, const char [])); /* draws temporary text; int determines where: 0=statusline, 1,2: at corners of zoom box, with \r separating text above and below the point */
void (*set_ruler) __PROTO((int, int)); /* set ruler location; x<0 switches ruler off */
void (*set_cursor) __PROTO((int, int, int)); /* set cursor style and corner of rubber band */
void (*set_clipboard) __PROTO((const char[])); /* write text into cut&paste buffer (clipboard) */
#endif
#ifdef PM3D
int (*make_palette) __PROTO((t_sm_palette *palette));
/* 1. if palette==NULL, then return nice/suitable
maximal number of colours supported by this terminal.
Returns 0 if it can make colours without palette (like
postscript).
2. if palette!=NULL, then allocate its own palette
return value is undefined
3. available: some negative values of max_colors for whatever
can be useful
*/
void (*previous_palette) __PROTO((void));
/* release the palette that the above routine allocated and get
back the palette that was active before.
Some terminals, like displays, may draw parts of the figure
using their own palette. Those terminals that possess only
one palette for the whole plot don't need this routine.
*/
void (*set_color) __PROTO((double gray));
/* gray is from [0;1], terminal uses its palette or another way
to transform in into gray or r,g,b
This routine (for each terminal separately) remembers or not
this colour so that it can apply it for the subsequent drawings
*/
void (*filled_polygon) __PROTO((int points, gpiPoint *corners));
#endif
} TERMENTRY;
#else
struct TERMENTRY {
char *name;
#if defined(_Windows) && !defined(WIN32)
char GPFAR description[80]; /* to make text go in FAR segment */
#else
char *description;
#endif
unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic;
FUNC_PTR options,init,reset,text,scale,graphics,move,vector,linetype,
put_text,text_angle,justify_text,point,arrow,set_font,
pointsize;
int flags;
FUNC_PTR suspend,resume,fillbox,linewidth;
};
#endif
#ifdef _Windows
# define termentry TERMENTRY far
#else
# define termentry TERMENTRY
#endif
extern struct termentry *term;
#ifndef GNUPLOT_NO_CODE_EMIT
struct termentry *term;
#endif /* !GNUPLOT_NO_CODE_EMIT */
#define RETVOID
#define RETINT , 1
( run in 4.674 seconds using v1.01-cache-2.11-cpan-2398b32b56e )