7.6

Table Of Contents
Arguments
x, y
Measure values representing the x and y coordinates respectively of the center of the circle.
arc_length
Measure value representing the length of the arc.
start_angle
Measure value representing the start angle, in degrees, for the arc. Degrees are relative to a standard X, Y axis, with a value
of 0 degrees lying flush with the X axis. The value of the start angle can be either positive or negative.
end_angle
Measure value representing the end angle, in degrees, for the arc. Degrees are relative to a standard X, Y axis, with a value of
0 degrees lying flush with the X axis. The value of the end angle can be either positive or negative.
Code Sample Examples
Example 1
Example 1 draws a 180 degree arc 3 inches in length. The center of the circle is at (0,0). The rmoveto() command that pre-
cedes the arc() command ensures the current point is set at the center of the circle and prevents a line from being drawn from
the current point to the start point of the arc.
rmoveto(3,0)
arc(0,0,3,0,180)
stroke()
Example 2
Example 2 draws an arc 2.5 inches in length. The center for the arc is four inches from the left edge of the page and three
inches from the top edge. The arc starts at 30 degrees and ends at 60 degrees. The rmoveto() command that precedes the
arc() command moves the current point to the center of the circle, resulting in a line that is drawn from the center of the circle
to the start point of the arc.
rmoveto(4,3)
arc(4,3,2.5,30,60)
stroke()
ClosePath (procedure)
Closes any open path and completes the current shape, if need be, by drawing a line from the last point in the shape to the
starting point. This ensures the shape is closed, thus enabling filling to take place if specified. Only closed shapes can be filled.
Syntax
closepath()
Argument
None
©2010 Objectif Lune Inc - 572 -