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.
GpiBeginArea (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIPRIMITIVES
BOOL GpiBeginArea(hps, flOptions)
HPS hps; /* presentation-space handle */
ULONG flOptions; /* area-option flag */
The GpiBeginArea function starts an area bracket, that is, it starts a
sequence of functions that define the shape of an area. All subsequent
drawing functions, up to the next GpiEndArea function, apply to the new
area. The flOptions parameter specifies whether the figures in the area have
boundary lines and which filling mode to use for constructing the interior
of the area.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
flOptions Specifies the area options. It can be any combination of the
following values:
Value Meaning
─────────────────────────────────────────────────────────────────
BA_ALTERNATE Constructs the interior in alternate mode
(default).
BA_BOUNDARY Boundary lines are drawn.
BA_NOBOUNDARY Boundary lines are not drawn (default).
BA_WINDING Constructs the interior in winding mode.
Return Value
The return value is GPI_OK 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_ALREADY_IN_AREA
PMERR_INV_AREA_CONTROL
PMERR_INV_HPS
PMERR_INV_IN_PATH
PMERR_PS_BUSY
Example
This example uses the GpiBeginArea function to draw an area. The area, an
isosceles triangle, is drawn with boundary lines and filled using the
alternate filling mode.
HPS hps;
POINTL ptlStart = { 0, 0 };
POINTL ptlTriangle[] = { 100, 100, 200, 0, 0, 0 };
GpiMove(hps, &ptlStart); /* move to starting point (0, 0) */
GpiBeginArea(hps, /* start the area bracket */
BA_BOUNDARY | /* draw boundary lines */
BA_ALTERNATE); /* fill interior with alternate mode */
GpiPolyLine(hps, 3L, ptlTriangle); /* draw the triangle */
GpiEndArea(hps); /* end the area bracket */
/* and fill the area */
See Also
GpiEndArea, WinGetLastError
♦