7.6

Table Of Contents
Syntax
clippath()
Argument
None
Example
This example displays the coffee_time image partially, where only a square defined by the rlineto()is visible.
moveto((2.0000/(6.6529)) * &width, (0.2000/(4.9897)) * &height)
rlineto(0, (3.0000/(4.9897)) * &height)
rlineto((3.0000/(6.6529)) * &width, 0)
rlineto(0, neg((3.0000/(4.9897)) * &height))
closepath()
clippath()
moveto(0, 0)
showbitmap('coffee_time',&document.picturecolorres,&width,&height)
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
Code Sample Example
The first line of code sets the starting point of a triangle, the second and third lines of code draw the first and second lines (or
sides) of the triangle, the fourth line of code closes the triangle shape by implicitly issuing a moveto command.
Example
moveto(1.0,1.0)lineto(1.5,2.0)
lineto(0.5,2.0)
closepath()
fill()
Cos (function)
Returns the cosine value of the specified angle.
Syntax
cos( value ) measure value
©2010 Objectif Lune Inc - 263 -