/* * Glimit Window limits in world coordinates (WC) */ typedef struct { double xmin; /* x min. limit */ double xmax; /* x max. limit */ double ymin; /* y min. limit */ double ymax; /* y max. limit */ } Glimit; /* * Gilimit Viewport limits in device coordinates (DC) */ typedef struct { int xmin; /* x min. limit */ int xmax; /* x max. limit */ int ymin; /* y min. limit */ int ymax; /* y max. limit */ } Gilimit; /* * Gtran Window -> Viewport transformation */ typedef struct { Glimit w; /* window */ Gilimit v; /* viewport */ } Gtran; /* * Gpoint A point in WC */ typedef struct { double x,y; } Gpoint; /* * Gipoint A point in DC */ typedef struct { int x,y; } Gipoint; /* * Gmap Transformation matrix. */ typedef struct { double xm,ym,xa,ya; } Gmap; /* * Gflinter. Fill interior style. */ typedef enum { HOLLOW, SOLID, PATTERN, HATCH } Gflinter; /* * Define the users function return values. */ extern int setwindow(),setviewport(),selntran(); extern int setlinetype(),setlinecolour(); extern int setfillintstyle(),setfillcolour(),setfillindex(); extern int openws(),closews(),polyline(),gdp51(),gdp52(),gdp53(); extern int pause(); /* * Graphics state list. */ #include "gks.h" #define NUMTRAN 12 #define NUMWS 4 typedef struct { int scr_width; /* Screen width in pixels. */ int scr_height; /* Screen height in pixels. */ Gtran ntran[NUMTRAN]; /* Vector of transformations. */ Gtran curntr; /* Current transformation. */ Gmap curmap; /* Current transformation matrix. */ int ltype; /* Current linetype. */ int lci; /* Current line colour index. */ Gflinter fstyle; /* Current fill style. */ int fstyle_index; /* Fill style index. */ int fci; /* Fill colour index. */ } Gstate; Gstate wsdt[NUMWS]; Gstate *wsd; /* Current workstation state table. */