Next Previous Up Top Contents Index

6.5 Drawing using path related functions

6.5.1 Functions for controlling the definition of a path

The following generic functions provide overall control of the definition of a path. In each case, the argument drawable is either a sheet or a medium.

start-path

Generic function

start-path drawable => ()

Starts a new path on drawable. The path can be created with any number of calls to line-to, curve-to, arc-to, and move-to. Its appearance can also be manipulated using fill-path and stroke-path.
After creating the path, use either close-path or end-path to finish the path, or abort-path to abandon it altogether.
end-path

Generic function

end-path drawable => ()

Ends the definition of the current path in drawable. Once the definition has been ended, the path can be rendered to the drawable using fill-path or stroke-path.
The function close-path can also be used to end the definition of a path.
close-path

Generic function

close-path drawable => ()

Closes the current path on the drawable: that is, creates a closed figure from the elements already defined.
For example, if you create a path that has four connected lines (using line-to), you can use close-path to join the first and last lines in the path to create a closed, five-sided figure.
abort-path

Generic function

abort-path drawable => ()

Aborts the current path on drawable. Any operations that have been performed since the last call to start-path are discarded.
fill-path

Generic function

fill-path drawable => ()

Uses the current brush to fill the current path on drawable. Only closed paths can be filled. If the path has not already been closed using close-path, it is closed automatically.
stroke-path

Generic function

stroke-path drawable => ()

Uses the current pen to draw the current path on drawable. Note that the path must not have been previously filled. This function does not close the path: you must use close-path if you wish to do this.

Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index