7.5

Table Of Contents
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:
Define (procedure)
This command creates a new local variable, or redefines an existing one. The define procedure must appear before the var-
iable is actually used. PlanetPress Talk scripts require all variables to be defined either as a global variable in your document,
or a local scope variable within your PlanetPress Talk script.
©2010 Objectif Lune Inc - 416 -