BOOL Polygon(hDC,lpPoints,nCount)
This function draws a polygon consisting of two or more points (vertices) connected by lines. The polygons are filled using the current polygon-filling mode. For a description of the polygon-filling mode, see the SetPolyFillMode function, later in this chapter. The polygon is automatically closed, if necessary, by drawing a line from the last vertex to the first.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
lpPoints | LPPOINT Points to an array of points that specify the vertices of the polygon. Each point in the array is a POINT data structure. | |
nCount | int Specifies the number of vertices given in the array. |
The return value specifies the outcome of the function. It is nonzero if the function is successful. Otherwise, it is zero.
The current position is neither used nor updated by this function.
The current polygon-filling mode can be retrieved or set by using the GetPolyFillMode and SetPolyFillMode functions.