7.4

Table Of Contents
Code Sample Example
This example draws a whole pie chart with a shadow effect.
Example
setfillcolor([0,0,0,50]) %Set shadow colour to gray
pie(1.5,1.5,1,60,290) %Create shadow for first slice
translate(0.2,0.2) %Separate shadows
pie(1.5,1.5,1,290,420) %Create shadow for second slice
fill() %Display shadows
translate(-0.3, 0.3) %Offset chart from its shadow
setstrokecolor([0,0,100,0]) %Set pen colour to yellow
setfillcolor([0,100,100,0]) %Set fill colour to red
pie(1.5,1.5,1,60,290) %Create first slice
strokeandfill() %Draw first slice
translate(0.2,0.2) %Separate slices
setfillcolor([100,100,0,0]) %Set fill colour to blue
pie(1.5,1.5,1,290,420) %Create second slice
strokeandfill() %Draw second slice
Rectangle (procedure)
Creates and draws a rectangle shape. The rectangle can optionally be filled using the colour specified with the setfillcolor
command. The border can optionally be drawn using the colour specified with the setstrokecolor command.
Syntax
rectangle( x, y, x1, y1, filled, stroked )
Arguments
x, y
Measure values representing the horizontal/vertical position, in inches, of the starting point.
x1, y1
Measure values representing the horizontal/vertical position, in inches, of the bottom right corner of the rectangle.
filled
Boolean value specifying whether the shape should be filled using the colour specified with the setfillcolor command.
stroked
©2010 Objectif Lune Inc - 578 -