The R Project SVN R

Rev

Rev 61333 | Rev 68949 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
29921 ripley 1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
59039 ripley 3
 *  Copyright (C) 2001-11 The R Core Team.
29921 ripley 4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
42308 ripley 16
 *  along with this program; if not, a copy is available at
17
 *  http://www.r-project.org/Licenses/
29921 ripley 18
 */
17204 hornik 19
 
44154 ripley 20
/* Used by graphics.c, grid and by third-party graphics devices */
29921 ripley 21
 
34747 ripley 22
#ifndef R_GRAPHICSENGINE_H_
23
#define R_GRAPHICSENGINE_H_
24
 
25
#ifdef __cplusplus
26
extern "C" {
27
#endif
28
 
32815 murrell 29
/*
30
 * The current graphics engine (including graphics device) API version
31
 * MUST be integer
57122 maechler 32
 *
33
 * This number should be bumped whenever there are changes to
32815 murrell 34
 * GraphicsEngine.h or GraphicsDevice.h so that add-on packages
35
 * that compile against these headers (graphics systems such as
36
 * graphics and grid;  graphics devices such as gtkDevice, RSvgDevice)
37
 * can detect any version mismatch.
38
 *
39
 * Version 1:  Introduction of the version number.
34785 murrell 40
 * Version 2:  GEDevDesc *dd dropped from GEcontourLines().
56854 ripley 41
 * Version 3:  R_GE_str2col() added to API. (r41887)
44308 ripley 42
 * Version 4:  UTF-8 text hooks, useRotatedTextInContour,
44418 ripley 43
 *             add newFrameConfirm() to NewDevDesc.
44412 ripley 44
 *             New API: GEaddDevice[2] GEgetDevice, GEkillDevice,
56854 ripley 45
 *             ndevNumber. (R 2.7.0)
44404 ripley 46
 * Version 5:  Clean up 1.4.0/2.0.0 changes!
44308 ripley 47
 *             Remove newDevStruct from GEDevDesc and NewDevDesc.
44404 ripley 48
 *             Remove asp, dot(), hold(), open() from NewDevDesc.
49
 *             Move displayList, DLlastElt, savedSnapshot from
50
 *             NewDevDesc to GEDevDesc.
56854 ripley 51
 *             Add 'ask' to GEDevDesc. (R 2.8.0)
52
 * Version 6:  Add dev_Raster() and dev_Cap()  (R 2.11.0)
57122 maechler 53
 * Version 7:  Change graphics event handling, adding eventEnv and eventHelper()
56854 ripley 54
 *	       to DevDesc.  (R 2.12.0)
55
 * Version 8:  Add dev_Path() (R 2.12.0)
57122 maechler 56
 * Version 9:  Add dev_HoldFlush(), haveTrans*, haveRaster,
56854 ripley 57
 *             haveCapture, haveLocator.  (R 2.14.0)
61351 ripley 58
 * Version 10: For R 3.0.0.  Typedef and use 'rcolor',
59
 *             Remove name2col (R_GE_str2col does the job).
32815 murrell 60
 */
61
 
61351 ripley 62
#define R_GE_version 10
32815 murrell 63
 
44195 ripley 64
int R_GE_getVersion(void);
32815 murrell 65
 
66
void R_GE_checkVersionOrDie(int version);
67
 
57122 maechler 68
/* The graphics engine will only accept locations and dimensions
17204 hornik 69
 * in native device coordinates, but it provides the following functions
57122 maechler 70
 * for converting between a couple of simple alternative coordinate
17204 hornik 71
 * systems and device coordinates:
72
 *    DEVICE = native units of the device
57122 maechler 73
 *    NDC = Normalised device coordinates
17204 hornik 74
 *    INCHES = inches (!)
75
 *    CM = centimetres (!!)
76
 */
77
 
78
typedef enum {
79
 GE_DEVICE	= 0,	/* native device coordinates (rasters) */
80
 GE_NDC	= 1,	/* normalised device coordinates x=(0,1), y=(0,1) */
81
 GE_INCHES = 2,
82
 GE_CM     = 3
83
} GEUnit;
84
 
85
#define MAX_GRAPHICS_SYSTEMS 24
86
 
87
typedef enum {
88
    /* In response to this event, the registered graphics system
89
     * should allocate and initialise the systemSpecific structure
57122 maechler 90
     *
51056 murrell 91
     * Should return R_NilValue on failure so that engine
92
     * can tidy up memory allocation
17204 hornik 93
     */
94
    GE_InitState = 0,
95
    /* This event gives the registered system a chance to undo
96
     * anything done in the initialisation.
97
     */
98
    GE_FinaliseState = 1,
99
    /* This is sent by the graphics engine prior to initialising
100
     * the display list.  It give the graphics system the chance
101
     * to squirrel away information it will need for redrawing the
102
     * the display list
103
     */
104
    GE_SaveState = 2,
105
    /* This is sent by the graphics engine prior to replaying the
106
     * display list.  It gives the graphics system the chance to
107
     * restore any information it saved on the GE_SaveState event
108
     */
109
    GE_RestoreState = 6,
110
    /* Copy system state information to the current device.
111
     * This is used when copying graphics from one device to another
112
     * so all the graphics system needs to do is to copy across
113
     * the bits required for the display list to draw faithfully
114
     * on the new device.
115
     */
116
    GE_CopyState = 3,
117
    /* Create a snapshot of the system state that is sufficient
118
     * for the current "image" to be reproduced
119
     */
120
    GE_SaveSnapshotState = 4,
121
    /* Restore the system state that is saved by GE_SaveSnapshotState
122
     */
123
    GE_RestoreSnapshotState = 5,
57122 maechler 124
    /* When replaying the display list, the graphics engine
125
     * checks, after each replayed action, that the action
17204 hornik 126
     * produced valid output.  This is the graphics system's
127
     * chance to say that the output is crap (in which case the
128
     * graphics engine will abort the display list replay).
129
     */
17270 murrell 130
    GE_CheckPlot = 7,
131
    /* The device wants to scale the current pointsize
132
     * (for scaling an image)
57122 maechler 133
     * This is not a nice general solution, but a quick fix for
17270 murrell 134
     * the Windows device.
135
     */
136
    GE_ScalePS = 8
17204 hornik 137
} GEevent;
138
 
44271 ripley 139
/*
140
 *  Some line end/join constants
141
 */
142
typedef enum {
143
  GE_ROUND_CAP  = 1,
144
  GE_BUTT_CAP   = 2,
145
  GE_SQUARE_CAP = 3
146
} R_GE_lineend;
147
 
148
typedef enum {
149
  GE_ROUND_JOIN = 1,
150
  GE_MITRE_JOIN = 2,
151
  GE_BEVEL_JOIN = 3
152
} R_GE_linejoin;
153
 
57122 maechler 154
/*
155
 * A structure containing graphical parameters
44271 ripley 156
 *
157
 * This is how graphical parameters are passed from graphics systems
158
 * to the graphics engine AND from the graphics engine to graphics
159
 * devices.
160
 *
161
 * Devices are not *required* to honour graphical parameters
162
 * (e.g., alpha transparency is going to be tough for some)
163
 */
164
typedef struct {
165
    /*
166
     * Colours
167
     *
168
     * NOTE:  Alpha transparency included in col & fill
169
     */
170
    int col;             /* pen colour (lines, text, borders, ...) */
171
    int fill;            /* fill colour (for polygons, circles, rects, ...) */
172
    double gamma;        /* Gamma correction */
57122 maechler 173
    /*
44271 ripley 174
     * Line characteristics
175
     */
176
    double lwd;          /* Line width (roughly number of pixels) */
177
    int lty;             /* Line type (solid, dashed, dotted, ...) */
178
    R_GE_lineend lend;   /* Line end */
179
    R_GE_linejoin ljoin; /* line join */
180
    double lmitre;       /* line mitre */
181
    /*
182
     * Text characteristics
183
     */
184
    double cex;          /* Character expansion (font size = fontsize*cex) */
185
    double ps;           /* Font size in points */
186
    double lineheight;   /* Line height (multiply by font size) */
187
    int fontface;        /* Font face (plain, italic, bold, ...) */
188
    char fontfamily[201]; /* Font family */
189
} R_GE_gcontext;
190
 
44301 ripley 191
typedef R_GE_gcontext* pGEcontext;
192
 
57122 maechler 193
 
46180 ripley 194
#include <R_ext/GraphicsDevice.h> /* needed for DevDesc */
44271 ripley 195
 
19966 duncan 196
typedef struct _GEDevDesc GEDevDesc;
17204 hornik 197
 
19966 duncan 198
typedef SEXP (* GEcallback)(GEevent, GEDevDesc *, SEXP);
199
 
57122 maechler 200
typedef struct {
17204 hornik 201
    /* An array of information about each graphics system that
202
     * has registered with the graphics engine.
203
     * This is used to store graphics state for each graphics
204
     * system on each device.
205
     */
206
    void *systemSpecific;
57122 maechler 207
    /*
17204 hornik 208
     * An array of function pointers, one per graphics system that
209
     * has registered with the graphics engine.
210
     *
211
     * system_Callback is called when the graphics engine wants
212
     * to give a graphics system the chance to play with its
213
     * device-specific information (stored in systemSpecific)
214
     * There are two parameters:  an "event" to tell the graphics
215
     * system why the graphics engine has called this function,
216
     * and the systemSpecific pointer.  The graphics engine
217
     * has to pass the systemSpecific pointer because only
218
     * the graphics engine will know what array index to use.
219
     */
220
    GEcallback callback;
221
} GESystemDesc;
222
 
19966 duncan 223
struct _GEDevDesc {
57122 maechler 224
    /*
30832 murrell 225
     * Stuff that the devices can see (and modify).
226
     * All detailed in GraphicsDevice.h
227
     */
44364 ripley 228
    pDevDesc dev;
30832 murrell 229
    /*
230
     * Stuff about the device that only the graphics engine sees
231
     * (the devices don't see it).
17204 hornik 232
     */
44352 ripley 233
    Rboolean displayListOn;  /* toggle for display list status */
234
    SEXP displayList;        /* display list */
235
    SEXP DLlastElt;          /* A pointer to the end of the display list
236
				to avoid tranversing pairlists */
237
    SEXP savedSnapshot;      /* The last element of the display list
238
			      * just prior to when the display list
239
			      * was last initialised
240
			      */
241
    Rboolean dirty;          /* Has the device received any output? */
31938 murrell 242
    Rboolean recordGraphics; /* Should a graphics call be stored
243
			      * on the display list?
244
			      * Set to FALSE by do_recordGraphics,
57122 maechler 245
			      * do_dotcallgr, and do_Externalgr
31938 murrell 246
			      * so that nested calls are not
247
			      * recorded on the display list
248
			      */
57122 maechler 249
    /*
30832 murrell 250
     * Stuff about the device that only graphics systems see.
251
     * The graphics engine has no idea what is in here.
252
     * Used by graphics systems to store system state per device.
253
     */
17204 hornik 254
    GESystemDesc *gesd[MAX_GRAPHICS_SYSTEMS];
44458 ripley 255
 
256
    /* per-device setting for 'ask' (use NewFrameConfirm) */
257
    Rboolean ask;
19966 duncan 258
};
17204 hornik 259
 
44285 ripley 260
typedef GEDevDesc* pGEDevDesc;
261
 
44259 ripley 262
/* functions from devices.c for use by graphics devices */
263
 
264
#define desc2GEDesc		Rf_desc2GEDesc
46180 ripley 265
/* map DevDesc to enclosing GEDevDesc */
44364 ripley 266
pGEDevDesc desc2GEDesc(pDevDesc dd);
44285 ripley 267
int GEdeviceNumber(pGEDevDesc);
44412 ripley 268
pGEDevDesc GEgetDevice(int);
44372 ripley 269
void GEaddDevice(pGEDevDesc);
44376 ripley 270
void GEaddDevice2(pGEDevDesc, const char *);
44285 ripley 271
void GEkillDevice(pGEDevDesc);
44364 ripley 272
pGEDevDesc GEcreateDevDesc(pDevDesc dev);
44257 ripley 273
 
44285 ripley 274
void GEdestroyDevDesc(pGEDevDesc dd);
44299 ripley 275
void *GEsystemState(pGEDevDesc dd, int index);
44285 ripley 276
void GEregisterWithDevice(pGEDevDesc dd);
17360 murrell 277
void GEregisterSystem(GEcallback callback, int *systemRegisterIndex);
17204 hornik 278
void GEunregisterSystem(int registerIndex);
44364 ripley 279
SEXP GEhandleEvent(GEevent event, pDevDesc dev, SEXP data);
17204 hornik 280
 
38705 ripley 281
#define fromDeviceX		GEfromDeviceX
282
#define toDeviceX		GEtoDeviceX
283
#define fromDeviceY		GEfromDeviceY
284
#define toDeviceY		GEtoDeviceY
285
#define fromDeviceWidth		GEfromDeviceWidth
286
#define toDeviceWidth		GEtoDeviceWidth
287
#define fromDeviceHeight	GEfromDeviceHeight
288
#define toDeviceHeight		GEtoDeviceHeight
289
 
57122 maechler 290
double fromDeviceX(double value, GEUnit to, pGEDevDesc dd);
44285 ripley 291
double toDeviceX(double value, GEUnit from, pGEDevDesc dd);
57122 maechler 292
double fromDeviceY(double value, GEUnit to, pGEDevDesc dd);
44285 ripley 293
double toDeviceY(double value, GEUnit from, pGEDevDesc dd);
57122 maechler 294
double fromDeviceWidth(double value, GEUnit to, pGEDevDesc dd);
44285 ripley 295
double toDeviceWidth(double value, GEUnit from, pGEDevDesc dd);
57122 maechler 296
double fromDeviceHeight(double value, GEUnit to, pGEDevDesc dd);
44285 ripley 297
double toDeviceHeight(double value, GEUnit from, pGEDevDesc dd);
17204 hornik 298
 
44264 ripley 299
/*-------------------------------------------------------------------
300
 *
301
 *  COLOUR CODE is concerned with the internals of R colour representation
302
 *
303
 *  From colors.c, used in par.c, grid/src/gpar.c
304
 */
305
 
61351 ripley 306
typedef unsigned int rcolor;
307
 
44264 ripley 308
#define RGBpar			Rf_RGBpar
44369 ripley 309
#define RGBpar3			Rf_RGBpar3
44264 ripley 310
#define col2name                Rf_col2name
311
 
44312 ripley 312
/* Convert an element of a R colour specification (which might be a
313
   number or a string) into an internal colour specification. */
61351 ripley 314
rcolor RGBpar(SEXP, int);
315
rcolor RGBpar3(SEXP, int, rcolor);
44357 ripley 316
 
44312 ripley 317
/* Convert an internal colour specification to/from a colour name */
61351 ripley 318
const char *col2name(rcolor col); /* used in par.c, grid */
44357 ripley 319
 
44369 ripley 320
/* Convert either a name or a #RRGGBB[AA] string to internal.
321
   Because people were using it, it also converts "1", "2" ...
322
   to a colour in the palette, and "0" to transparent white.
323
*/
61351 ripley 324
rcolor R_GE_str2col(const char *s);
44264 ripley 325
 
326
 
44312 ripley 327
 
17204 hornik 328
/*
329
 *	Some Notes on Line Textures
330
 *
331
 *	Line textures are stored as an array of 4-bit integers within
332
 *	a single 32-bit word.  These integers contain the lengths of
333
 *	lines to be drawn with the pen alternately down and then up.
334
 *	The device should try to arrange that these values are measured
335
 *	in points if possible, although pixels is ok on most displays.
336
 *
337
 *	If newlty contains a line texture description it is decoded
338
 *	as follows:
339
 *
340
 *		ndash = 0;
341
 *		for(i=0 ; i<8 && newlty & 15 ; i++) {
342
 *			dashlist[ndash++] = newlty & 15;
343
 *			newlty = newlty>>4;
344
 *		}
345
 *		dashlist[0] = length of pen-down segment
346
 *		dashlist[1] = length of pen-up segment
347
 *		etc
348
 *
349
 *	An integer containing a zero terminates the pattern.  Hence
350
 *	ndash in this code fragment gives the length of the texture
351
 *	description.  If a description contains an odd number of
352
 *	elements it is replicated to create a pattern with an
353
 *	even number of elements.  (If this is a pain, do something
354
 *	different its not crucial).
355
 *
356
 */
357
 
358
/*--- The basic numbered & names line types; Here device-independent:
359
  e.g. "dashed" == "44",  "dotdash" == "1343"
360
*/
361
 
44154 ripley 362
/* NB: was also in Rgraphics.h in R < 2.7.0 */
17204 hornik 363
#define LTY_BLANK	-1
364
#define LTY_SOLID	0
365
#define LTY_DASHED	4 + (4<<4)
366
#define LTY_DOTTED	1 + (3<<4)
367
#define LTY_DOTDASH	1 + (3<<4) + (4<<8) + (3<<12)
368
#define LTY_LONGDASH	7 + (3<<4)
369
#define LTY_TWODASH	2 + (2<<4) + (6<<8) + (2<<12)
370
 
44142 ripley 371
R_GE_lineend GE_LENDpar(SEXP value, int ind);
372
SEXP GE_LENDget(R_GE_lineend lend);
373
R_GE_linejoin GE_LJOINpar(SEXP value, int ind);
374
SEXP GE_LJOINget(R_GE_linejoin ljoin);
30925 murrell 375
 
44285 ripley 376
void GESetClip(double x1, double y1, double x2, double y2, pGEDevDesc dd);
44500 ripley 377
void GENewPage(const pGEcontext gc, pGEDevDesc dd);
57122 maechler 378
void GELine(double x1, double y1, double x2, double y2,
44500 ripley 379
	    const pGEcontext gc, pGEDevDesc dd);
57122 maechler 380
void GEPolyline(int n, double *x, double *y,
44500 ripley 381
		const pGEcontext gc, pGEDevDesc dd);
57122 maechler 382
void GEPolygon(int n, double *x, double *y,
44500 ripley 383
	       const pGEcontext gc, pGEDevDesc dd);
57122 maechler 384
SEXP GEXspline(int n, double *x, double *y, double *s, Rboolean open,
36748 murrell 385
	       Rboolean repEnds, Rboolean draw,
44500 ripley 386
	       const pGEcontext gc, pGEDevDesc dd);
17204 hornik 387
void GECircle(double x, double y, double radius,
44500 ripley 388
	      const pGEcontext gc, pGEDevDesc dd);
17204 hornik 389
void GERect(double x0, double y0, double x1, double y1,
44500 ripley 390
	    const pGEcontext gc, pGEDevDesc dd);
57122 maechler 391
void GEPath(double *x, double *y,
52406 murrell 392
            int npoly, int *nper,
393
            Rboolean winding,
394
            const pGEcontext gc, pGEDevDesc dd);
50283 murrell 395
void GERaster(unsigned int *raster, int w, int h,
396
              double x, double y, double width, double height,
397
              double angle, Rboolean interpolate,
398
              const pGEcontext gc, pGEDevDesc dd);
399
SEXP GECap(pGEDevDesc dd);
44986 ripley 400
void GEText(double x, double y, const char * const str, cetype_t enc,
21060 murrell 401
	    double xc, double yc, double rot,
44500 ripley 402
	    const pGEcontext gc, pGEDevDesc dd);
44285 ripley 403
void GEMode(int mode, pGEDevDesc dd);
17204 hornik 404
void GESymbol(double x, double y, int pch, double size,
44500 ripley 405
	      const pGEcontext gc, pGEDevDesc dd);
17204 hornik 406
void GEPretty(double *lo, double *up, int *ndiv);
57122 maechler 407
void GEMetricInfo(int c, const pGEcontext gc,
17204 hornik 408
		  double *ascent, double *descent, double *width,
44285 ripley 409
		  pGEDevDesc dd);
57122 maechler 410
double GEStrWidth(const char *str, cetype_t enc,
44500 ripley 411
		  const pGEcontext gc, pGEDevDesc dd);
44986 ripley 412
double GEStrHeight(const char *str, cetype_t enc,
44500 ripley 413
		  const pGEcontext gc, pGEDevDesc dd);
57567 murrell 414
void GEStrMetric(const char *str, cetype_t enc, const pGEcontext gc,
415
                 double *ascent, double *descent, double *width,
416
                 pGEDevDesc dd);
44142 ripley 417
int GEstring_to_pch(SEXP pch);
17204 hornik 418
 
44142 ripley 419
/*-------------------------------------------------------------------
420
 *
421
 *  LINE TEXTURE CODE is concerned with the internals of R
422
 *  line texture representation.
423
 */
424
unsigned int GE_LTYpar(SEXP, int);
425
SEXP GE_LTYget(unsigned int);
426
 
50488 murrell 427
/*
428
 * Raster operations
429
 */
50554 murrell 430
void R_GE_rasterScale(unsigned int *sraster, int sw, int sh,
431
                      unsigned int *draster, int dw, int dh);
50488 murrell 432
void R_GE_rasterInterpolate(unsigned int *sraster, int sw, int sh,
433
                            unsigned int *draster, int dw, int dh);
50554 murrell 434
void R_GE_rasterRotatedSize(int w, int h, double angle,
435
                            int *wnew, int *hnew);
436
void R_GE_rasterRotatedOffset(int w, int h, double angle, int botleft,
437
                              double *xoff, double *yoff);
57122 maechler 438
void R_GE_rasterResizeForRotation(unsigned int *sraster,
439
                                  int w, int h,
50554 murrell 440
                                  unsigned int *newRaster,
441
                                  int wnew, int hnew,
442
                                  const pGEcontext gc);
443
void R_GE_rasterRotate(unsigned int *sraster, int w, int h, double angle,
50608 murrell 444
                       unsigned int *draster, const pGEcontext gc,
445
                       Rboolean perPixelAlpha);
50488 murrell 446
 
50554 murrell 447
 
57122 maechler 448
/*
449
 * From plotmath.c
19875 murrell 450
 */
57122 maechler 451
double GEExpressionWidth(SEXP expr,
44500 ripley 452
			 const pGEcontext gc, pGEDevDesc dd);
57122 maechler 453
double GEExpressionHeight(SEXP expr,
44500 ripley 454
			  const pGEcontext gc, pGEDevDesc dd);
57567 murrell 455
void GEExpressionMetric(SEXP expr, const pGEcontext gc,
456
                        double *ascent, double *descent, double *width,
457
                        pGEDevDesc dd);
19875 murrell 458
void GEMathText(double x, double y, SEXP expr,
57122 maechler 459
		double xc, double yc, double rot,
44500 ripley 460
		const pGEcontext gc, pGEDevDesc dd);
57122 maechler 461
/*
21060 murrell 462
 * (End from plotmath.c)
19875 murrell 463
 */
464
 
57122 maechler 465
/*
44158 ripley 466
 * From plot3d.c : used in package clines
21060 murrell 467
 */
468
SEXP GEcontourLines(double *x, int nx, double *y, int ny,
34785 murrell 469
		    double *z, double *levels, int nl);
57122 maechler 470
/*
21060 murrell 471
 * (End from plot3d.c)
472
 */
473
 
57122 maechler 474
/*
21060 murrell 475
 * From vfonts.c
476
 */
44986 ripley 477
double R_GE_VStrWidth(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd);
21060 murrell 478
 
44986 ripley 479
double R_GE_VStrHeight(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd);
57122 maechler 480
void R_GE_VText(double x, double y, const char * const s, cetype_t enc,
21060 murrell 481
		double x_justify, double y_justify, double rotation,
44500 ripley 482
		const pGEcontext gc, pGEDevDesc dd);
57122 maechler 483
/*
21060 murrell 484
 * (End from vfonts.c)
485
 */
486
 
44154 ripley 487
/* Also in Graphics.h */
17204 hornik 488
#define	DEG2RAD 0.01745329251994329576
489
 
44285 ripley 490
pGEDevDesc GEcurrentDevice(void);
491
Rboolean GEdeviceDirty(pGEDevDesc dd);
492
void GEdirtyDevice(pGEDevDesc dd);
493
Rboolean GEcheckState(pGEDevDesc dd);
494
Rboolean GErecording(SEXP call, pGEDevDesc dd);
495
void GErecordGraphicOperation(SEXP op, SEXP args, pGEDevDesc dd);
496
void GEinitDisplayList(pGEDevDesc dd);
497
void GEplayDisplayList(pGEDevDesc dd);
17204 hornik 498
void GEcopyDisplayList(int fromDevice);
44285 ripley 499
SEXP GEcreateSnapshot(pGEDevDesc dd);
500
void GEplaySnapshot(SEXP snapshot, pGEDevDesc dd);
44195 ripley 501
void GEonExit(void);
502
void GEnullDevice(void);
34747 ripley 503
 
504
 
59105 maechler 505
/* From ../../main/plot.c, used by ../../library/grid/src/grid.c : */
45051 ripley 506
#define CreateAtVector		Rf_CreateAtVector
507
SEXP CreateAtVector(double*, double*, int, Rboolean);
59105 maechler 508
/* From ../../main/graphics.c, used by ../../library/grDevices/src/axis_scales.c : */
57122 maechler 509
#define GAxisPars 		Rf_GAxisPars
510
void GAxisPars(double *min, double *max, int *n, Rboolean log, int axis);
45051 ripley 511
 
34747 ripley 512
#ifdef __cplusplus
513
}
514
#endif
515
 
516
#endif /* R_GRAPHICSENGINE_ */