All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

draw-polygon Function

Summary

Draws a polygon.

Package

graphics-ports

Signature

draw-polygon port points &rest args &key filled closed fill-rule

Arguments
port
A graphics port.
points
A description sequence.
args
graphics-state parameters passed as keyword arguments.
filled
A boolean.
closed
A boolean.
fill-rule
A keyword.
Description

The function draw-polygon draws a polygon using alternating x and y values in points as the vertices. When closed is true the edge from the last vertex to the first to be drawn. When filled is true a filled, closed polygon is drawn; closed is ignored if filled is true.

The transform, foreground, background, operation, thickness, scale-thickness, dashed, dash, line-end-style, line-joint-style, mask, pattern, shape-mode and compositing-mode from port's graphics-state are all used, unless overridden in args. Additionally on X11/Motif only, stipple is used.

fill-rule specifies how overlapping regions are filled. Possible values are :even-odd and :winding.

See also

draw-polygons
graphics-state
13 Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:44