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

draw-rectangle Function

Summary

Draws a rectangle.

Package

graphics-ports

Signature

draw-rectangle port x y width height &rest args &key filled

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

The function draw-rectangle draws a rectangle whose corners are (x y), (x+width y), (x+width y+height) and (x y+height).

filled, if non-nil, causes a filled rectangle to be drawn. While the exact results are host-specific, it is intended that a filled rectangle does not include the lines where the x coordinate is x+width or the y coordinate is y+height while a non-filled rectangle does. This function works correctly if port's transform includes rotation.

The transform, foreground, background, operation, thickness, scale-thickness, dashed, dash, 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.

See also

draw-rectangles
graphics-state
13 Drawing - Graphics Ports


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