1 typedef struct gimage {
5 typedef struct gpoint {
11 typedef struct gwindow *GWindow;
12 typedef struct gdisplay GDisplay;
13 typedef struct gwindow_attrs {
16 void (*init) (GDisplay *);
17 void (*term) (GDisplay *);
19 typedef struct gpswindow {
21 typedef struct gpsdisplay {
22 struct displayfuncs *funcs;
24 extern void _GPSDraw_Image();
25 extern void _GPSDraw_TileImage();
26 extern void _GPSDraw_ImageMagnified();
27 extern void _GPSDraw_LoadFontMetrics();
33 _GPSDraw_StylizeFont();
34 void _PSDraw_CopyScreenToImage()
38 void _PSDraw_Pixmap(GWindow _w, GWindow _pixmap, GRect * src, int x,
42 static void _PSDraw_TilePixmap(GWindow _w, GWindow _pixmap, GRect * src, int x,
46 static void PSMyArc(GPSWindow ps, double cx, double cy, double radx,
47 double rady, double sa, double ta)
52 temp = ((int)((sa + 90) / 90)) * 90;
53 PSDoArc(ps, cx, cy, radx, rady, sa, ea < temp ? ea : temp);
57 static void PSDrawElipse(GPSWindow ps, GRect * rct, char *command)
59 float cx, cy, radx, rady;
61 PSMyArc(ps, cx, cy, radx, rady, 0, 360);
63 static void PSDrawDrawCircle(GWindow w, GRect * rct, unsigned int col)
66 static void PSDrawFillCircle(GWindow w, GRect * rct, unsigned int col)
68 GPSWindow ps = (GPSWindow) w;
69 PSDrawElipse(ps, rct, "fill");
71 static void PSDrawDrawArc(GWindow w, GRect * rct, int sa, int ta, unsigned int col)
74 static void PSDrawDrawPoly(GWindow w, GPoint * pt, short cnt, unsigned int col)
77 static void _GPSDraw_Text1(GWindow gw, struct font_data *fd, int x, int y,
78 char *txt, int cnt, FontMods * mods, unsigned int col)
81 static void _GPSDraw_Text2(GWindow gw, struct font_data *fd, int x, int y,
82 GChar2b * txt, int cnt, FontMods * mods, unsigned int col)
85 int GPSPrinterEndJob(GWindow w, int cancel)
88 static struct displayfuncs psfuncs = {
89 PSDrawDrawCircle, PSDrawFillCircle, PSDrawDrawArc, PSDrawDrawPoly,
90 _GPSDraw_Image, _GPSDraw_TileImage, _GPSDraw_ImageMagnified,
91 _PSDraw_CopyScreenToImage, _PSDraw_Pixmap, _PSDraw_TilePixmap,
92 _GPSDraw_ScaleFont, _GPSDraw_StylizeFont, _GPSDraw_LoadFontMetrics,
93 _GPSDraw_Text1, _GPSDraw_Text2, GPSPrinterEndJob
95 void _GPSDraw_CreateDisplay()
98 gdisp->funcs = &psfuncs;