The names of the graphics-order codes are in the form OCODE_Gxxx. The Gxxx abbreviation is the name of the individual order, and can be used for types, structures, and constants directly related to that order. In the header file, there is a comment on the same line as each of the orders that describes the order. For example, the Begin Area order (GBAR) is described in the header file as follows:
#define OCODE_GBAR 0x68 /* Begin area */ #define GBAR_BOUNDARY 0xC0
Note:
In some structures, an S or an L is added to the name to differentiate between the short-coordinate form (16-bit) and the long-coordinate form (32-bit). For example, the Set Arc Parameters order (GSAP) is as follows:
#define OCODE_GSAP 0x22 #define OCODE_GPSAP 0x62 typedef struct _ORDERS_GSAP { SHORT p; SHORT q; SHORT r; SHORT s; } ORDERS_GSAP; typedef struct _ORDERL_GSAP { LONG p; LONG q; LONG r; LONG s; } ORDERL_GSAP;
In this example, the structures ORDERS_GSAP and ORDERL_GSAP are shared by GSAP (set arc parameters) and GPSAP (push and set arc parameters). As a rule, there is structure sharing between the set and push-and-set forms of graphics orders.
There is structure-sharing between the current-position and the given-position forms of some orders. For example, the orders GCARC (arc at current position) and GARC (arc at given position) share a structure.