An application specifies the area construction when it calls GpiBeginArea. There are two options:

As with area construction, in alternate mode:

Also as with area construction, in winding mode, the direction in which the boundary lines of the polygons are drawn determines whether a given point is included in the filled polygon. Since the individual polygons drawn with GpiPolygons are generated by independent structures, the direction in which a polygon is drawn depends only on the vertices of that polygon.

To determine if a given point is included in the filled polygon, count the number of lines to be crossed to move from that point to infinity. For each boundary line drawn in one direction add one to the tally. For each line drawn in the opposite direction, subtract one from the tally. A point is within the polygon if the result is nonzero.


[Back] [Next]