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

draw-circle Function

Summary

Draws a circle.

Package

graphics-ports

Signature

draw-circle port x y radius &rest args &key filled

Arguments
port
A graphics port.
A real number.
A real number.
radius
A real number.
args
graphics-state parameters passed as keyword arguments.
filled
A boolean.
Description

The function draw-circle draws a circle with radius radius centered on (x y). The transform, foreground, background, operation, thickness, scale-thickness, mask, shape-mode and compositing-mode from port's graphics-state are all used, unless overridden in args. When filled is non-nil, the circle is filled with the foreground color.

Notes

draw-circle does not work properly under a rotation transform (see make-transform). A workaround is to use a many-sided polygon drawn by draw-polygon which will be rotated correctly.

Examples
(gp:draw-circle port 100 100 20)
(gp:draw-circle port 100 100 50
                       :filled t
                       :foreground :green)
See also

graphics-state
12 Creating Panes with Your Own Drawing and Input


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