Next Previous Up Top Contents Index

6.5 Drawing using path related functions

6.5.2 Functions for describing the appearance of a path

The following generic functions actually perform drawing operations within a path. Again, in each case, the argument drawable is either a sheet or a medium. All other arguments are instances of <real>.

line-to

Generic function

line-to drawable x y => ()

Draws a line from the current position in the path to (x,y).
curve-to

Generic function

curve-to drawable x1 y1 x2 y2 x3 y3 => ()

Draws a curve in the current path on drawable starting from the current position, and passing through (x1,y1), (x2, y2), and (x3, y3).
move-to

Generic function

move-to drawable x y => ()

Move the position in the current path on drawable to (x,y).
The function move-to can be used several times within the definition of a path, allowing for the definition of several visually separate sections within the same path.
arc-to

Generic function

arc-to drawable center-x center-y radius-1-dx radius-1-dy radius-2-dx radius-2-dy #key start-angle end-angle => ()

Draws an arc in the current path on drawable.

Figure 6.9 Description of the arguments for arc-to

The center of the arc is defined by (center-x, center-y), the points furthest away from the center for each radius are calculated by adding radius-1-dx and radius-1-dy to center-x and center-y respectively (to calculate the outermost points for the first radius), and adding radius-2-dx and radius-2-dy to center-x and center-y respectively (to calculate the outermost points for the second radius).
The arguments start-angle and end-angle define the extent of the arc that is drawn.

For each function listed above, an equivalent function is also provided that passes composite objects in its arguments, rather than separate coordinates. These functions take the same name as the functions above, but with a * character appended. (Thus, line-to* performs the same operation as line-to, but passes composite objects in its arguments). You should be aware that using these composite object functions may lead to a loss of performance. For more details, see the full reference entries for each function.


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index