OSDN Git Service

rebuid
[eos/base.git] / src / Objects / DataExpress / psFile / doc / psFile.html
1 <HR>
2 <A NAME="Information">
3 <H2>Information from source codes</H2>
4 </A>
5 <PRE>
6 ../src/psFileCircle.c:
7
8 ../src/psFileContour.c:
9
10 ../src/psFileContour3D.c:
11
12 ../src/psFileEnd.c:
13
14 ../src/psFileImage.c:
15
16 ../src/psFileInit.c:
17
18 ../src/psFileLine.c:
19
20 ../src/psFilePage.c:
21
22 ../src/psFileRead.c:
23
24 ../src/psFileString.c:
25
26 ../src/psFileUtil.c:
27 </PRE>
28 <HR>
29 <A NAME="include">
30 <H2>psFile.h</H2>
31 </A>
32 <PRE>
33 #ifndef PS_FILE_H
34 #define PS_FILE_H
35 /*
36 * PostScript File IO utility Header File
37 *   Edited by Tac
38 *   1992.10
39 */
40 #include "File.h"
41
42 /* constant begin */
43 #define MAX_STRING_LENGTH 256
44                              
45 #define PS_FILE_STATUS_ERROR     (0)
46 #define PS_FILE_STATUS_OK        (1)
47 /* constant end */
48
49 /* struct begin */
50 typedef long   psParaTypeInteger;
51 typedef double psParaTypeReal;
52
53 typedef struct psInfo {
54     psParaTypeInteger prologInfoNum;
55     char**            prologInfo;
56         char              label[MAX_STRING_LENGTH];
57     psParaTypeInteger page;
58     psParaTypeInteger status;
59 } psInfo;
60
61 typedef struct psPageInfo psPageInfo;
62
63 struct psPageInfo {
64         psParaTypeInteger page;
65         psParaTypeInteger byte;
66         long start;
67         long end;
68         psPageInfo* next;
69 };
70
71 typedef struct psFile {
72         FILE* fpt;
73         psInfo info;
74         long headEnd;
75         psPageInfo* current;
76         psPageInfo* top;
77         psPageInfo* end;
78         long byte;
79 } psFile;
80
81 /* struct end */
82
83 /* constant begin */
84 #define PROLOG_STRING_NUM    (11)
85
86 #define PROLOG_VERSION        (0)
87 #define PROLOG_TITLE          (1)
88 #define PROLOG_CREATOR        (2)
89 #define PROLOG_CREATION_DATE  (3)
90 #define PROLOG_FOR            (4)
91 #define PROLOG_BOUND_BOX      (5)
92 #define PROLOG_PAGES          (6)
93 #define PROLOG_DOC_FONTS      (7)
94 #define PROLOG_END_DOC        (8)
95 #define PROLOG_END_PRO        (9)
96
97 typedef enum psImageScaleMode {
98     psImageScaleModeBottomLeft = 1,
99     psImageScaleModeCenter     = 2
100 } psImageScaleMode;
101
102 #define PS_IMAGE_CENTRE_LINE_WIDTH  (0.1)
103 #define PS_IMAGE_CENTRE_MARK_LENGTH (0.01)
104
105 #define PS_IMAGE_SCALE_LINE_WIDTH0 (0.2)
106 #define PS_IMAGE_SCALE_LINE_WIDTH1 (0.1)
107 #define PS_IMAGE_SCALE_LINE_LENGTH0 (10.0)
108 #define PS_IMAGE_SCALE_LINE_LENGTH1 (5.0)
109 #define PS_IMAGE_SCALE_LINE_LENGTH2 (3.0)
110 #define PS_IMAGE_SCALE_LINE_LENGTH3 (2.0)
111 #define PS_IMAGE_SCALE_LINE_LENGTH4 (1.0)
112 #define PS_IMAGE_SCALE_LINE_LENGTH00 (-10.0)
113 #define PS_IMAGE_SCALE_LINE_LENGTH10 (-5.0)
114 #define PS_IMAGE_SCALE_LINE_LENGTH20 (-3.0)
115 #define PS_IMAGE_SCALE_LINE_LENGTH30 (-2.0)
116 #define PS_IMAGE_SCALE_LINE_LENGTH40 (-1.0)
117
118 #define psContourMode_DifferentLineWidthContour (0x01)
119 #define psContourMode_SameLineWidthContour      (0x02)
120
121 /* constant end */
122
123 /* struct begin */
124 typedef struct psImageInfo {
125         /* For Image Space */
126     psParaTypeReal scaleX;
127     psParaTypeReal scaleY;
128     psParaTypeReal translateX;
129     psParaTypeReal translateY;
130     psParaTypeReal angle;
131
132         /* Image Size */
133     psParaTypeInteger width;
134     psParaTypeInteger height;
135     psParaTypeInteger section;
136         /* For Contour */
137     psParaTypeInteger bps;
138     psParaTypeInteger nContour;
139     psParaTypeReal*   contourLevel;
140         /* For Density Image */
141     unsigned char*    image;
142         /* For Contour */
143     float*            floatImage;
144         psParaTypeReal    contourLineColorChange;
145         psParaTypeReal    contourLineWidthStart;
146         psParaTypeReal    contourLineWidthStep;
147
148         /* For 3D Contour */
149         psParaTypeReal    eyeX;   /* Eye Position */
150         psParaTypeReal    eyeY;
151         psParaTypeReal    eyeZ;
152         psParaTypeReal    pointX; /* Projection Surface Position */
153         psParaTypeReal    pointY; /* Surface Normal: (position - eye)  */
154         psParaTypeReal    pointZ;
155
156         /* For Colour */
157         psParaTypeInteger flagRGBColor; 
158         psParaTypeInteger flagRGBGradientColor; 
159         psParaTypeReal Red;
160         psParaTypeReal Green;
161         psParaTypeReal Blue;
162         psParaTypeReal RedFirst;
163         psParaTypeReal GreenFirst;
164         psParaTypeReal BlueFirst;
165         psParaTypeReal RedLast;
166         psParaTypeReal GreenLast;
167         psParaTypeReal BlueLast;
168         psParaTypeInteger flagHSBColor; 
169         psParaTypeInteger flagHSBGradientColor; 
170         psParaTypeReal Hue;
171         psParaTypeReal Saturation;
172         psParaTypeReal Brightness;
173         psParaTypeReal HueFirst;
174         psParaTypeReal SaturationFirst;
175         psParaTypeReal BrightnessFirst;
176         psParaTypeReal HueLast;
177         psParaTypeReal SaturationLast;
178         psParaTypeReal BrightnessLast;
179
180         /* For Line Colour */
181         psParaTypeInteger flagLineRGBColor;     
182         psParaTypeInteger flagLineRGBGradientColor;     
183         psParaTypeReal LineRed;
184         psParaTypeReal LineGreen;
185         psParaTypeReal LineBlue;
186         psParaTypeReal LineRedFirst;
187         psParaTypeReal LineGreenFirst;
188         psParaTypeReal LineBlueFirst;
189         psParaTypeReal LineRedLast;
190         psParaTypeReal LineGreenLast;
191         psParaTypeReal LineBlueLast;
192         psParaTypeInteger flagLineHSBColor;     
193         psParaTypeInteger flagLineHSBGradientColor;     
194         psParaTypeReal LineHue;
195         psParaTypeReal LineSaturation;
196         psParaTypeReal LineBrightness;
197         psParaTypeReal LineHueFirst;
198         psParaTypeReal LineSaturationFirst;
199         psParaTypeReal LineBrightnessFirst;
200         psParaTypeReal LineHueLast;
201         psParaTypeReal LineSaturationLast;
202         psParaTypeReal LineBrightnessLast;
203
204         /* For Circle */
205         psParaTypeReal CircleRadius;
206     long              dummy;
207 } psImageInfo;
208 /* struct end */
209
210 /* constant begin */
211 #define PS_PLOT_MODE_AXIS (0x000000ff)
212 #define PS_PLOT_MODE_AXIS_X_AXIS_POS (0x00000001) /* 0: Down 1: Up */
213 #define PS_PLOT_MODE_AXIS_Y_AXIS_POS (0x00000002) /* 0: Left 1: Write */
214 #define PS_PLOT_MODE_AXIS (0x000000ff)
215
216 #define PS_LINE_CIRCLE_MODE (0)
217 #define PS_FILL_WHITE_CIRCLE_MODE (1)
218 #define PS_FILL_BLACK_CIRCLE_MODE (2)
219
220 #define PS_PLOT_SCALE_X_AXIS_Y_POSITION_DOWN ( -5.0)
221 #define PS_PLOT_SCALE_X_AXIS_Y_POSITION_UP   (105.0)
222 #define PS_PLOT_SCALE_X_AXIS_LENGTH     (1.0)
223 /* constant end */
224
225 /* struct begin */
226 typedef struct psPlotInfo {
227     psParaTypeReal scaleX;
228     psParaTypeReal scaleY;
229     psParaTypeReal translateX;
230     psParaTypeReal translateY;
231
232     psParaTypeReal dX;
233     psParaTypeReal dXValue;
234     psParaTypeReal minX;
235     psParaTypeReal centreX;
236     psParaTypeReal maxX;
237     char*          labelX;
238
239     psParaTypeReal dY;
240     psParaTypeReal dYValue;
241     psParaTypeReal minY;
242     psParaTypeReal centreY;
243     psParaTypeReal maxY;
244     char*          labelY;
245
246     psParaTypeInteger nData;
247     psParaTypeReal *data;
248 } psPlotInfo;
249 /* struct end */
250
251 #ifdef __cplusplus
252 extern "C" {
253 #endif 
254
255 /* prototype begin */
256
257 /* in psFileInit.c */
258 extern void psFileInit(psFile* ps, psParaTypeInteger mode);
259
260 /* in psFilePage.c */
261 extern void psFilePageStart(psFile* ps, psParaTypeInteger mode);
262 extern void psFilePageEnd(psFile* ps, psParaTypeInteger mode);
263
264 /* in psFileEnd.c */
265 extern void psFileEnd(psFile* ps);
266
267 /* in psFileImage.c */
268 extern void psFileImage            (psFile* ps, psImageInfo im, psParaTypeInteger mode);
269 extern void psFileImageByCircles   (psFile* ps, psImageInfo im, psParaTypeInteger mode);
270 extern void psFileImageCentre      (psFile* ps, psImageInfo im, psParaTypeInteger mode);
271 extern void psFileImageScale       (psFile* ps, psImageInfo im, psParaTypeInteger mode);
272 extern void psFileImageSpaceSet    (psFile* ps, psImageInfo im, psParaTypeInteger mode);
273 extern void psFileImageSpaceRotateSet    (psFile* ps, psImageInfo im, psParaTypeInteger mode);
274 extern void psFileImageSpaceRestore(psFile* ps, psImageInfo im, psParaTypeInteger mode);
275 extern void psFileImageSpaceRotateRestore(psFile* ps, psImageInfo im, psParaTypeInteger mode);
276
277 /* in psFileLine.c */
278 extern void psFileLineWidthSet     (psFile* ps, float lineWidth);
279 extern void psFileLineDraw(psFile* ps, float x1,float y1,float x2,float y2);
280 extern void psFileDendgramLineDraw(psFile* ps, float width,float height1, float height2, float x, float y);
281
282 /* in psFileString.c */
283 extern void psFileStringStatusSet(psFile* ps, char* fontname, double fontsize);
284 extern void psFileStringDefaultStatusSet(psFile* ps);
285 extern void psFileString (psFile* ps, char* message, double x, double y, psParaTypeInteger mode);
286
287 /* in psFileContour.c */
288 extern void psFileContour(psFile* ps, psImageInfo im, psParaTypeInteger mode);
289 /* in psFileCircle.c */
290 extern void psFileCircleCreate(psFile* ps, float cx, float cy, float r, long mode);
291
292
293
294 /* in psFileRead.c */
295 extern void psFileRead(psFile* ps, FILE* fpt, long mode);
296
297
298 /* in psFileUtil.c */
299 extern long psFileIsStartPage(psFile* ps, char* s);
300 extern long psFileIsEndPage(psFile* ps, char* s);
301
302 /* prototype end */
303
304 #ifdef __cplusplus
305 };
306 #endif
307 #endif /* PS_FILE_H */
308 </PRE>