Next Previous Up Top Contents Index

6.6 DUIM-Graphics Module

draw-rectangle

Generic function

Summary

Draws a rectangle at the specified position.

Signature

draw-rectangle drawable x1 y1 x2 y2 #key filled? => ()
draw-rectangle* drawable point1 point2 #key filled? => ()

Arguments

drawable
An instance of type type-union(<sheet>, <medium>).

filled?
An instance of type <boolean>. Default value: #t.

The following arguments are specific to draw-rectangle.

x1
An instance of type <real>.

y1
An instance of type <real>.

x2
An instance of type <real>.

y2
An instance of type <real>.

The following arguments are specific to draw-rectangle*.

point1
An instance of type <transform>.

point2
An instance of type <transform>.

Values

None.

Library

duim-graphics

Module

duim-graphics

Description

Draws a rectangle on drawable with left and right corners at (x1,y1) and (x2,y2), using the current pen. Dashed lines start dashing at the starting point of the first segment.

Note that the specified points could represent either top or bottom corners: only one rectangle is possible between and pair of points.

If filled? is #t then the rectangle will be filled, using the current brush.

The function draw-rectangle* is identical to draw-rectangle, except that it passes composite objects, rather than separate coordinates, in its arguments. You should be aware that using this function may lead to a loss of performance.

See also

draw-polygon, page 428

draw-rectangles, page 431

draw-regular-polygon, page 433

draw-triangle, page 437


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index