The R Project SVN R

Rev

Rev 59039 | Rev 59177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 59084
Line 32... Line 32...
32
#include <Rgraphics.h> /* RUnit */
32
#include <Rgraphics.h> /* RUnit */
33
 
33
 
34
typedef unsigned int rcolor;
34
typedef unsigned int rcolor;
35
 
35
 
36
/* base.c, graphics.c, par.c */
36
/* base.c, graphics.c, par.c */
37
#define MAX_LAYOUT_ROWS 50
37
#define MAX_LAYOUT_ROWS 200
38
#define MAX_LAYOUT_COLS 50
38
#define MAX_LAYOUT_COLS 200
39
#define MAX_LAYOUT_CELLS 500 /* must be less than 65535, 
39
#define MAX_LAYOUT_CELLS 10007 /* must be less than 65535,
40
				3 copies, 3bytes each */
40
				3 copies, 3bytes each */
41
 
41
 
42
typedef struct {
42
typedef struct {
43
	double ax;
43
	double ax;
44
	double bx;
44
	double bx;
Line 46... Line 46...
46
	double by;
46
	double by;
47
} GTrans;
47
} GTrans;
48
 
48
 
49
typedef struct {
49
typedef struct {
50
    /* Plot State */
50
    /* Plot State */
51
    /* 
51
    /*
52
       When the device driver is started this is 0
52
       When the device driver is started this is 0
53
       After the first call to plot.new/perps it is 1
53
       After the first call to plot.new/perps it is 1
54
       Every graphics operation except plot.new/persp
54
       Every graphics operation except plot.new/persp
55
       should fail if state = 0 
55
       should fail if state = 0
56
       This is checked at the highest internal function
56
       This is checked at the highest internal function
57
       level (e.g., do_lines, do_axis, do_plot_xy, ...) 
57
       level (e.g., do_lines, do_axis, do_plot_xy, ...)
58
    */
58
    */
59
 
59
 
60
    int	state;		/* plot state: 1 if GNewPlot has been called 
60
    int	state;		/* plot state: 1 if GNewPlot has been called
61
			   (by plot.new or persp) */
61
			   (by plot.new or persp) */
62
    Rboolean valid;	/* valid layout ?  Used in GCheckState & do_playDL */
62
    Rboolean valid;	/* valid layout ?  Used in GCheckState & do_playDL */
63
 
63
 
64
    /* GRZ-like Graphics Parameters */
64
    /* GRZ-like Graphics Parameters */
65
    /* ``The horror, the horror ... '' */
65
    /* ``The horror, the horror ... '' */
Line 78... Line 78...
78
    rcolor col;		/* Plotting Color */
78
    rcolor col;		/* Plotting Color */
79
    double crt;		/* Character/string rotation */
79
    double crt;		/* Character/string rotation */
80
    double din[2];	/* device size in inches */
80
    double din[2];	/* device size in inches */
81
    int	err;		/* Error repporting level */
81
    int	err;		/* Error repporting level */
82
    rcolor fg;		/* **R ONLY** Foreground Color */
82
    rcolor fg;		/* **R ONLY** Foreground Color */
83
    char family[201];  /* **R ONLY** Font family 
83
    char family[201];  /* **R ONLY** Font family
84
			   Simple name which is mapped by device-specific
84
			   Simple name which is mapped by device-specific
85
			   font database to device-specific name.
85
			   font database to device-specific name.
86
			   Only used if not "".
86
			   Only used if not "".
87
			   Default is "".
87
			   Default is "".
88
			   Ignored by some devices. */
88
			   Ignored by some devices. */
Line 291... Line 291...
291
SEXP FixupLty(SEXP, int);
291
SEXP FixupLty(SEXP, int);
292
SEXP FixupLwd(SEXP, double);
292
SEXP FixupLwd(SEXP, double);
293
SEXP FixupVFont(SEXP);
293
SEXP FixupVFont(SEXP);
294
SEXP labelformat(SEXP);
294
SEXP labelformat(SEXP);
295
 
295
 
296
/* 
296
/*
297
 * Function to generate an R_GE_gcontext from Rf_gpptr info
297
 * Function to generate an R_GE_gcontext from Rf_gpptr info
298
 *
298
 *
299
 * from graphics.c, used in plot.c, plotmath.c
299
 * from graphics.c, used in plot.c, plotmath.c
300
 */
300
 */
301
void gcontextFromGP(pGEcontext gc, pGEDevDesc dd);
301
void gcontextFromGP(pGEcontext gc, pGEDevDesc dd);