gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiErase (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPICONTROL
 
BOOL GpiErase(hps)
HPS hps;    /* presentation-space handle */
 
The GpiErase function clears the display associated with the specified
presentation space. The function clears the display by filling it with the
color specified by the CLR_BACKGROUND color index for the presentation
space. The function clips the output to the current clipping region,
graphics field, and visual region (if any), but does not clip to the current
viewing limits and clipping path. Also, the function ignores the current
draw controls (as set by the GpiSetDrawControl function).
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
    PMERR_INV_HPS
    PMERR_PS_BUSY
 
Example
 
This example uses the GpiErase function to clear the display before
drawing:
 
GpiErase(hps);                        /* clear the display */
GpiMove(hps, &ptlStart);              /* draw a triangle   */
GpiPolyLine(hps, 3L, ptlTriangle);
 
See Also
 
GpiCloseSegment, GpiSetColor, GpiSetDrawControl