//POLYGON, MODE, BRUSH, X1, Y1, X2, Y2, X3, Y3 {...X10, Y10}
This draws a polygon based on ten or fewer points. Straight lines are drawn between the points using the current pen (including a line from the last point back to the first). The points are specified in the current map mode.
MODE specifies the polygon fill mode:
Mode |
Meaning |
---|---|
0 |
Use existing mode (whatever was last set) |
1 |
("Alternate") Fills in the area between odd and even sides |
2 |
("Winding") Fills in any area with a non-zero "winding value". |
The difference between the modes is not significant for simple enclosed polygons, but becomes apparent with polygons whose sides cross over themselves. An illustrative example would be a five-pointed star, whose lines intersect to create a pentagon in the middle. The ALTERNATE fill mode would fill in the points, whereas the WINDING fill mode would fill in the entire region.
The "winding value" is defined as the number of times a pen used to draw the polygon would go around the region.