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

NextPrevUpTopContentsIndex

clear-rectangle

Function
Summary

Draws a rectangle in the port's background color.

clear-rectangle is deprecated.

Package

graphics-ports

Signature

clear-rectangle port x y width height

Arguments

port

A graphics port.

x

A real number.

y

A real number.

width

A real number.

height

A real number.

Description

The deprecated function clear-rectangle draws the rectangle specified by x , y , width , and height in port 's background color. All other graphics-state parameters are ignored.

clear-rectangle is deprecated because it ignores the graphics state args, which means it does not work properly with other drawing functions. In particular, it does not work properly in the display-callback of output-pane.

Use instead:

(draw-rectangle pane
 x
 y
 width
 height
                :filled t
                :foreground color
                :compositing-mode :copy
                :shape-mode :plain)

compositing-mode is needed only when the color has alpha.

foreground is needed only if it is different from the foreground in the graphics state.

Note that draw-rectangle does take into account the transformation in the graphics-state.

See also

draw-rectangle
Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017

NextPrevUpTopContentsIndex