Next Previous Up Top Contents Index

6.6 DUIM-Graphics Module

draw-arrow

Generic function

Summary

Draws an arrow between two specified points.

Signature

draw-arrow drawable x1 y1 x2 y2 #key from-head? to-head? head-length head-width => ()
draw-arrow* drawable point1 point2 #key from-head? to-head? head-length head-width => ()

Arguments

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

from-head?
An instance of type <boolean>. Default value: #f.

to-head?
An instance of type <boolean>. Default value: #t.

head-length
An instance of type <integer>. Default value: 10.

head-width
An instance of type <integer>. Default value: 5.

The following arguments are specific to draw-arrow.

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-arrow*.

point1
An instance of type <transform>.

point2
An instance of type <transform>.

Values

None.

Library

duim-graphics

Module

duim-graphics

Description

Draws an arrow on drawable between two (x1,y1) and (x2, y2), using the current pen. Dashed lines start dashing from the first point.

If from-head? is #t, then the arrow-head points from (x1,y1) to (x2, y2). If to-head? is #t, then the arrow-head points from (x2, y2) to (x1,y1).

If both from-head? and to-head? are #t, then a double-headed arrow is drawn.

The arguments head-length and head-width specify the length and width of the arrow-head respectively, in pixels.

The function draw-arrow* is identical to draw-arrow, 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-line, page 421


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index