draw-polygon in dc<%>
Draws and paints a polygon from a list of points. The current pen is used for drawing the outline, and the current brush for filling the shape.
If both the pen and brush are non-transparent, the polygon is filled with the brush before the outline is drawn with the pen. The filling and outline meet so that no space is left between them, but the precise overlap between the filling and outline is platform- and shape-specific. Thus, the regions drawn by the brush and pen may overlap. More generally, the pen is centered over the polygon lines, rounding left and down in unsmoothed mode.
See also
set-smoothing for information on the 'aligned smoothing mode.
(-> voidsenda-dcdraw-polygonpointsxoffsetyoffsetfill-style)
points: list ofpoint%objects
xoffset=0: real number
yoffset=0: real number
fill-style='odd-even: symbol in'(odd-even winding)Draw a filled polygon using a list of
points, addingxoffsetandyoffsetto each point. The polygon is automatically closed, so the first and last point can be different.The
fill-styleargument specifies the fill rule:'odd-evenor'winding. In'odd-evenmode, a point is considered enclosed within the polygon if it is enclosed by an odd number of loops. In'windingmode, a point is considered enclosed within the polygon if it is enclosed by more or less clockwise loops than counter-clockwise loops. The'windingfill rule is not supported under Mac OS X, except when smoothing is enabled (seeset-smoothing).Restrictions on the magnitude of drawing coordinates are described with
dc<%>.