| Line 42... |
Line 42... |
| 42 |
*/
|
42 |
*/
|
| 43 |
typedef struct {
|
43 |
typedef struct {
|
| 44 |
/* The first element is a boolean indicating whether this is
|
44 |
/* The first element is a boolean indicating whether this is
|
| 45 |
* a new device driver (always 1) -- the old device driver structure
|
45 |
* a new device driver (always 1) -- the old device driver structure
|
| 46 |
* has had a similar element added (which will always be 0)
|
46 |
* has had a similar element added (which will always be 0)
|
| - |
|
47 |
*
|
| - |
|
48 |
* This needs to be removed once the old DevDesc structure has been
|
| - |
|
49 |
* removed from the system.
|
| 47 |
*/
|
50 |
*/
|
| 48 |
int newDevStruct;
|
51 |
int newDevStruct;
|
| 49 |
/********************************************************
|
52 |
/********************************************************
|
| 50 |
* Device state variables.
|
53 |
* Device physical characteristics
|
| 51 |
********************************************************/
|
54 |
********************************************************/
|
| 52 |
double left; /* left raster coordinate */
|
55 |
double left; /* left raster coordinate */
|
| 53 |
double right; /* right raster coordinate */
|
56 |
double right; /* right raster coordinate */
|
| 54 |
double bottom; /* bottom raster coordinate */
|
57 |
double bottom; /* bottom raster coordinate */
|
| 55 |
double top; /* top raster coordinate */
|
58 |
double top; /* top raster coordinate */
|
| - |
|
59 |
/* R only has the notion of a rectangular clipping region
|
| - |
|
60 |
*/
|
| 56 |
double clipLeft;
|
61 |
double clipLeft;
|
| 57 |
double clipRight;
|
62 |
double clipRight;
|
| 58 |
double clipBottom;
|
63 |
double clipBottom;
|
| 59 |
double clipTop;
|
64 |
double clipTop;
|
| - |
|
65 |
/* I hate these next three -- they seem like a real fudge
|
| 60 |
double gamma; /* Device Gamma Correction */
|
66 |
* BUT I'm not sure what to replace them with so they stay for now.
|
| - |
|
67 |
*/
|
| 61 |
double xCharOffset; /* x character addressing offset */
|
68 |
double xCharOffset; /* x character addressing offset */
|
| 62 |
double yCharOffset; /* y character addressing offset */
|
69 |
double yCharOffset; /* y character addressing offset */
|
| 63 |
double yLineBias; /* 1/2 interline space as frac of line hght */
|
70 |
double yLineBias; /* 1/2 interline space as frac of line hght */
|
| - |
|
71 |
double ipr[2]; /* Inches per raster; [0]=x, [1]=y */
|
| - |
|
72 |
double asp; /* Pixel aspect ratio = ipr[1]/ipr[0] */
|
| - |
|
73 |
/* I hate this guy too -- seems to assume that a device can only
|
| - |
|
74 |
* have one font size during its lifetime
|
| - |
|
75 |
* BUT removing/replacing it would take quite a lot of work
|
| - |
|
76 |
* to design and insert a good replacement so it stays for now.
|
| - |
|
77 |
*/
|
| - |
|
78 |
double cra[2]; /* Character size in rasters; [0]=x, [1]=y */
|
| - |
|
79 |
double gamma; /* Device Gamma Correction */
|
| - |
|
80 |
/********************************************************
|
| - |
|
81 |
* Device capabilities
|
| - |
|
82 |
********************************************************/
|
| 64 |
Rboolean canResizePlot; /* can the graphics surface be resized */
|
83 |
Rboolean canResizePlot; /* can the graphics surface be resized */
|
| 65 |
Rboolean canChangeFont; /* device has multiple fonts */
|
84 |
Rboolean canChangeFont; /* device has multiple fonts */
|
| 66 |
Rboolean canRotateText; /* text can be rotated */
|
85 |
Rboolean canRotateText; /* text can be rotated */
|
| 67 |
Rboolean canResizeText; /* text can be resized */
|
86 |
Rboolean canResizeText; /* text can be resized */
|
| 68 |
Rboolean canClip; /* Hardware clipping */
|
87 |
Rboolean canClip; /* Hardware clipping */
|
| 69 |
Rboolean canChangeGamma; /* can the gamma factor be modified */
|
88 |
Rboolean canChangeGamma; /* can the gamma factor be modified */
|
| 70 |
int canHAdj; /* Can do at least some horiz adjust of text
|
89 |
int canHAdj; /* Can do at least some horiz adjust of text
|
| 71 |
0 = none, 1 = {0,0.5, 1}, 2 = [0,1] */
|
90 |
0 = none, 1 = {0,0.5, 1}, 2 = [0,1] */
|
| - |
|
91 |
/********************************************************
|
| - |
|
92 |
* Device initial settings
|
| - |
|
93 |
********************************************************/
|
| 72 |
double ipr[2]; /* Inches per raster; [0]=x, [1]=y */
|
94 |
/* These are things that the device must set up when it is created.
|
| 73 |
double asp; /* Pixel aspect ratio = ipr[1]/ipr[0] */
|
95 |
* The graphics system can modify them and track current values,
|
| 74 |
double cra[2]; /* Character size in rasters; [0]=x, [1]=y */
|
96 |
* but some devices want to know what the original setting was.
|
| - |
|
97 |
*/
|
| 75 |
double startps;
|
98 |
double startps;
|
| 76 |
int startcol;
|
99 |
int startcol;
|
| 77 |
int startfill;
|
100 |
int startfill;
|
| 78 |
int startlty;
|
101 |
int startlty;
|
| 79 |
int startfont;
|
102 |
int startfont;
|
| 80 |
double startgamma;
|
103 |
double startgamma;
|
| - |
|
104 |
/********************************************************
|
| - |
|
105 |
* Device specific information
|
| - |
|
106 |
********************************************************/
|
| 81 |
void *deviceSpecific; /* pointer to device specific parameters */
|
107 |
void *deviceSpecific; /* pointer to device specific parameters */
|
| - |
|
108 |
/********************************************************
|
| - |
|
109 |
* Device display list
|
| - |
|
110 |
********************************************************/
|
| - |
|
111 |
/* I think it would feel nicer if this stuff was part of the
|
| - |
|
112 |
* graphics engine (GEDevDesc), but this is another thing that
|
| - |
|
113 |
* needs more time to implement a change properly.
|
| - |
|
114 |
*/
|
| 82 |
Rboolean displayListOn; /* toggle for display list status */
|
115 |
Rboolean displayListOn; /* toggle for display list status */
|
| 83 |
SEXP displayList; /* display list */
|
116 |
SEXP displayList; /* display list */
|
| 84 |
SEXP savedSnapshot; /* The last value of the display list
|
117 |
SEXP savedSnapshot; /* The last value of the display list
|
| 85 |
* just prior to when the display list
|
118 |
* just prior to when the display list
|
| 86 |
* was last initialised
|
119 |
* was last initialised
|
| 87 |
*/
|
120 |
*/
|
| 88 |
Rboolean ask; /* User confirmation of ``page eject'' */
|
- |
|
| 89 |
/********************************************************
|
121 |
/********************************************************
|
| 90 |
* Device procedures.
|
122 |
* Device procedures.
|
| 91 |
********************************************************/
|
123 |
********************************************************/
|
| 92 |
/*
|
124 |
/*
|
| 93 |
* device_Activate is called when a device becomes the
|
125 |
* device_Activate is called when a device becomes the
|