7.5

Table Of Contents
MoveTo/RMoveTo (procedure)
Moves the current point to the specified coordinates.
Syntax
moveto( x, y )
Arguments
x, y
Measure values representing the new horizontal/vertical position, in inches, of the current point. In rmoveto, these values
are relative to the current point of origin. In moveto, they are absolute values.
Code Sample Example
This example displays a triangle within a rectangle.
Example
rectstroke(.5,.5,2,2) %Draw rectangle
moveto(1,1) %Reset current point
lineto(1.5,2) %Draw first line
lineto(0.5,2) %Draw second line
closepath() %Close shape
stroke() %Draw shape
Pie (procedure)
Creates a pie slice shape, which can then be rendered using stroke, fill, or strokeandfill.
Syntax
pie( x, y, radius, startangle, endangle )
Arguments
x, y
Measure values representing the horizontal/vertical position, in inches, of a circle's center representing the whole pie from
which to draw a slice.
radius
Measure value representing the length, in inches, of the segments of the pie, i.e. its radius.
startangle, endangle
Measure values representing the angles, in degrees, of both segments of the pie slice. Values increase counter clock wise,
with 0 extending right from the center of the circle.
©2010 Objectif Lune Inc - 577 -