The following figure is an example of how to use area functions to draw two intersecting boxes, filled, using the winding mode.
#define INCL_GPI #include <os2.h> void fncAREA03(void){ POINTL ptl; /* Structure for current position */ HPS hps; GpiBeginArea(hps, BA_WINDING); ptl.x = 100; ptl.y = 50; GpiMove(hps, &ptl); ptl.x = 300; ptl.y = 250; GpiBox(hps, DRO_OUTLINE, &ptl, 0, 0); ptl.x = 180; ptl.y = 120; GpiMove(hps, &ptl); ptl.x = 380; ptl.y = 320; GpiBox(hps, DRO_OUTLINE, &ptl, 0, 0); GpiEndArea(hps); } /* fncAREA03 */