home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol7n20.zip
/
ENV720.ZIP
/
FIGURE7.C
< prev
next >
Wrap
Text File
|
1988-08-01
|
874b
|
26 lines
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) ;
}