30 Drawing Conveniences

▼ |  | The Racket Drawing Toolkit

1 | Overview
2 | bitmap%
3 | bitmap-dc%
4 | brush%
5 | brush-list%
6 | color%
7 | color-database<%>
8 | dc<%>
9 | dc-path%
10 | font%
11 | font-list%
12 | font-name-directory<%>
13 | gl-config%
14 | gl-context<%>
15 | linear-gradient%
16 | pdf-dc%
17 | pen%
18 | pen-list%
19 | point%
20 | post-script-dc%
21 | ps-setup%
22 | radial-gradient%
23 | record-dc%
24 | region%
25 | svg-dc%
26 | Drawing Functions
27 | Drawing Contracts
28 | Signature and Unit
29 | Unsafe Libraries
30 | Drawing Conveniences
31 | Platform Dependencies
| Bibliography
| Index

► | 30 | Drawing Conveniences

30.1 | Arrows

On this page:

30.1`` Arrows
draw-arrow

8.15
top contents ← prev up next →

### 30`` Drawing Conveniences🔗ℹ

This section presents higher-level APIs that provide additional conveniences over the racket/draw API.

#### 30.1`` Arrows🔗ℹ

(require racket/draw/arrow) | package: draw-lib

> > procedure
> > (draw-arrow |  | dc |  |  |  |
> > |  | start-x |  |  |  |
> > |  | start-y |  |  |  |
> > |  | end-x |  |  |  |
> > |  | end-y |  |  |  |
> > |  | dx |  |  |  |
> > |  | dy |  |  |  |
> > | [ | #:pen-width pen-width |  |  |  |
> > |  | #:arrow-head-size arrow-head-size |  |  |  |
> > |  | #:arrow-root-radius arrow-root-radius]) |  | → |  | void?
> dc : (is-a?/c dc<%>)
> start-x : real?
> start-y : real?
> end-x : real?
> end-y : real?
> dx : real?
> dy : real?
> pen-width : (or/c real? #f) = #f
> arrow-head-size : real? = 8
> arrow-root-radius : real? = 2.5

Draws an arrow on dc from (start-x, start-y) to (end-x, end-y). (dx, dy) is the top-left location for drawing. If pen-width is #f, the current pen width is used.

Added in version 1.9 of package draw-lib.

top contents ← prev up next →