home *** CD-ROM | disk | FTP | other *** search
- VOID DrawIt (HPS hps, SHORT cxClient, SHORT cyClient)
- {
- POINTL ptl ;
-
- GpiSetPattern (hps, 1L + rand() % 16) ; // Pattern = 1 to 16
- GpiSetColor (hps, (LONG) (rand() % 16)) ; // Color = 0 to 15
- GpiSetBackColor (hps, (LONG) (rand () % 16)) ; // Background color
- GpiSetBackMix (hps, BM_OVERPAINT) ; // Background mix
-
- GpiBeginArea (hps, BA_NOBOUNDARY) ;
-
- ptl.x = rand() % cxClient ; // First corner
- ptl.y = rand() % cyClient ;
- GpiMove (hps, &ptl) ;
-
- ptl.x = rand() % cxClient ; // Second corner
- ptl.y = rand() % cyClient ;
- GpiLine (hps, &ptl) ;
-
- ptl.x = rand() % cxClient ; // Third corner
- ptl.y = rand() % cyClient ;
- GpiLine (hps, &ptl) ;
-
- GpiEndArea (hps) ;
- }
-