typedef struct gimage { } GImage; typedef struct grect { } GRect; typedef struct gpoint { } GPoint; typedef struct { } FontRequest; typedef struct { } FontMods; typedef struct gwindow *GWindow; typedef struct gdisplay GDisplay; typedef struct gwindow_attrs { } GChar2b; struct displayfuncs { void (*init) (GDisplay *); void (*term) (GDisplay *); }; typedef struct gpswindow { } *GPSWindow; typedef struct gpsdisplay { struct displayfuncs *funcs; } GPSDisplay; extern void _GPSDraw_Image(); extern void _GPSDraw_TileImage(); extern void _GPSDraw_ImageMagnified(); extern void _GPSDraw_LoadFontMetrics(); extern void _GPSDraw_ScaleFont(); extern void _GPSDraw_StylizeFont(); void _PSDraw_CopyScreenToImage() { } static void _PSDraw_Pixmap(GWindow _w, GWindow _pixmap, GRect * src, int x, int y) { } static void _PSDraw_TilePixmap(GWindow _w, GWindow _pixmap, GRect * src, int x, int y) { } static void PSMyArc(GPSWindow ps, double cx, double cy, double radx, double rady, double sa, double ta) { double ea, temp; ea = sa + ta; while (sa < ea) { temp = ((int)((sa + 90) / 90)) * 90; PSDoArc(ps, cx, cy, radx, rady, sa, ea < temp ? ea : temp); sa = temp; } } static void PSDrawElipse(GPSWindow ps, GRect * rct, char *command) { float cx, cy, radx, rady; if (radx != rady) PSMyArc(ps, cx, cy, radx, rady, 0, 360); } static void PSDrawDrawCircle(GWindow w, GRect * rct, unsigned int col) { } static void PSDrawFillCircle(GWindow w, GRect * rct, unsigned int col) { GPSWindow ps = (GPSWindow) w; PSDrawElipse(ps, rct, "fill"); } static void PSDrawDrawArc(GWindow w, GRect * rct, int sa, int ta, unsigned int col) { } static void PSDrawDrawPoly(GWindow w, GPoint * pt, short cnt, unsigned int col) { } static void _GPSDraw_Text1(GWindow gw, struct font_data *fd, int x, int y, char *txt, int cnt, FontMods * mods, unsigned int col) { } static void _GPSDraw_Text2(GWindow gw, struct font_data *fd, int x, int y, GChar2b * txt, int cnt, FontMods * mods, unsigned int col) { } int GPSPrinterEndJob(GWindow w, int cancel) { } static struct displayfuncs psfuncs = { PSDrawDrawCircle, PSDrawFillCircle, PSDrawDrawArc, PSDrawDrawPoly, _GPSDraw_Image, _GPSDraw_TileImage, _GPSDraw_ImageMagnified, _PSDraw_CopyScreenToImage, _PSDraw_Pixmap, _PSDraw_TilePixmap, _GPSDraw_ScaleFont, _GPSDraw_StylizeFont, _GPSDraw_LoadFontMetrics, _GPSDraw_Text1, _GPSDraw_Text2, GPSPrinterEndJob }; void _GPSDraw_CreateDisplay() { GPSDisplay *gdisp; gdisp->funcs = &psfuncs; }