blob: 613db334547def21377515d9d215d648a8adad26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
/*
*
* The following definations allow for the efficient
* translation of DXY and RD-GL codes to PostScript code
*
*/
#include <stdio.h>
#include <math.h>
#include <ctype.h>
#define CR '\015'
#define LF '\012'
#define SPACE '\040'
#define SIGNED_NUMERIC (ungetc(( ch = getc(stream)),stream) != EOF ) &&\
(((ch>='0') && (ch<='9')) || (ch=='-') || (ch=='+')\
|| (ch==' ') || (ch==',') || (ch == '.'))
#define CIRCLE 21 /* DXY Circle */
#define RCIRCLE 22 /* DXY Relative Circle */
#define CCIRCLE 23 /* DXY Centered Circle */
#define ACIRCLE 24 /* DXY Arc plus Circle */
#define SCIRCLE 25 /* DXY Segment Circle */
#define RDGLCIRCLE 26 /* RD-GL Circle */
#define TEXT 31
#define MARK 32
#define LINETYPE 41
#define LINESCALE 42
#define LINE_TYPE_SCALE 43
/*
* Files to open if any
*/
FILE *stream;
FILE *fopen();
/*
* Plotting Parameters that will contain the necessary PostScript
* commands to plot (see dxy2ps.c for the initialisation) and
* ps_macros.c for the plotting macros).
*/
char *MOVE;
char *RMOVE;
char *DRAW;
char *RDRAW;
/*
* Definition of "ch" used in SIGNED_NUMERIC
*/
char ch;
/*
* Define the function getval() which returns a real number.
*/
float getval();
/*
* Scaling parameters used for translation from DXY and RD-GL
* coordinate sytem to the PostScript coordinate system which
* has been defined in millimeters. (See above)
*/
float SCALE;
float XSCALE;
float YSCALE;
float xmax, xmin;
float ymax, ymin;
/*
* End of line terminator (RD-GL / HP-GL)
*/
char EOL;
/*
* PostScript Coordinate parameters
*/
float lastXmove;
float lastYmove;
float absX;
float absY;
float xval;
float yval;
float xoffset, yoffset;
/*
* Extra parameters
*/
float char_angle;
float char_height;
float char_width;
float char_space;
float char_slant;
char font[60];
char symbol;
int dcount;
/*
* Degree radian conversion parameter ie: deg_rad = asin(1) / 90.0;
* ( Defined in dxy2ps.c or rdgl2ps.c )
*/
float deg_rad;
/*
* Line / pen size parameter (max 9 sizes)
*/
float pen_size[9];
/*
* Paper size (ie A3 or A4) and Mode (HPGL or DXY)
*/
char *PaperSize;
char *Mode;
/*
* Flags
*/
int LANDSCAPE;
int DRAW_FLAG;
int PLOTABS;
int PENDOWN;
int SETDOT; /* HP-GL commands only */
int SYMBOL; /* HP-GL commands only */
|