Windows 3.1 Device Drivers (ddag31qh.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.
Output(OS_ALTPOLYGON)
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
WORD Output(lpDestDev, OS_ALTPOLYGON, wCount, lpPoints, lpPPen, lpPBrush,
            lpDrawMode, lpClipRect)
LPPDEVICE lpDestDev;
WORD wCount;
LPPOINT lpPoints;
LPPPEN lpPPen;
LPPBRUSH lpPBrush;
LPDRAWMODE lpDrawMode;
LPRECT lpClipRect;
 
The OS_ALTPOLYGON style specifies that the Output function draws a polygon
and fills it using the alternate-filling method. GDI calls Output with this
style when an application calls functions, such as the Polygon function
(GDI.36), and the current polygon-filling mode is ALTERNATE.
 
The graphics driver must support the OS_ALTPOLYGON style if the
PC_ALTPOLYGON bit is set in the dpPolygonals member of the GDIINFO
structure.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
 
lpDestDev   Points to a PDEVICE or PBITMAP structure specifying the
            destination device or bitmap.
 
wCount      Specifies the POINT structures in the array pointed to by the
            lpPoints parameter.
 
lpPoints    Points to an array of POINT structures containing wCount
            elements. Each point represents a vertex of the polygon.
 
lpPPen      Points to a PPEN structure that specifies the physical pen to
            draw the border of the polygon.
 
lpPBrush    Points to a PBRUSH structure that specifies the physical brush
            to fill the polygon.
 
lpDrawMode  Points to a DRAWMODE structure containing the drawing
            information to draw and fill the polygon.
 
lpClipRect  Points to a RECT structure containing coordinates for the
            clipping rectangle. If the lpClipRect parameter is NULL, the
            clipping rectangle is the entire display surface.
 
Return Value
 
The return value is 1 if the function is successful. Otherwise, it is zero
if the function encounters an unrecoverable error. The return value is -1 if
the function does not support the given style and wants GDI to simulate the
output.
 
Comments
 
The Output function fills the interior of the polygon first, then draws the
border.
 
To fill the polygon, Output calculates the polygon outline and fills it
according to the alternate-filling method. Alternate filling typically fills
every other closed area within a polygon. In general, a given area should be
filled if a horizontal ray, starting in the area and continuing through the
left edge of the polygon, crosses an odd number of polygon sides.
 
To draw the border, Output draws a line segment from the first point in the
array to the second, from the second to the third, and so on. If the last
line segment does not end at the first point, Output draws this line segment
to ensure a closed figure.
 
Although the Output function can use device hardware to draw and fill
polygons, the function either must provide the same capability when drawing
to a main memory bitmap, or returns a value of -1 to direct GDI to simulate
the output using polylines and scan lines.
 
See Also
 
Output(OS_WINDPOLYGON)