7.5

Table Of Contents
and automatically set to the current cursor position. The first control point defines the direction the curve takes when moving
from the starting point, and before shifting to the second control point, which defines a second curve before reaching the end-
ing point.
A complete explanation of Bezier curves is beyond the scope of this document. Feel free, however, to try out this command
using the PlanetPress Talk Editor in PlanetPress in order to study its possibilities.
To draw a simple curve, use the same (x,y) coordinates for both control points.
Syntax
curveto( x1, y1, x2, y2, x3, y3 )
Arguments
x1, y1, x2, y2, x3, y3
Pairs of measure values representing the horizontal/vertical position, in inches, of each point defining the Bezier curve. When
using rcurveto, these values are relative to the current point of origin. When using curveto, they are absolute values.
Code Sample Example
This example draws a triangle with a twisted bottom side. The triangle has a blue outline and is filled with yellow.
Example
setstrokecolor([100,100,0,0])
setfillcolor([0,0,100,0])
moveto(1,1)
lineto(1.5,2)
curveto(1,1,1,3,0.5,2)
closepath()
strokeandfill()
Result:
Fill (procedure)
Fills the current closed shape, using the colour specified with the setfillcolor command. Only the inside of the shape is filled,
not its outline. To fill and outline the shape, use strokeandfill command instead. If you only want to outline the shape, use
©2010 Objectif Lune Inc - 575 -