6.0

Table Of Contents
130
Language Reference
4
Example
setfillcolor([0,100,100,0])
%Draw first rectangle using rectfill with red
rectfill(1,1,2,2)
%Offset starting position slightly to distinguish
%between each rectangle and fill second one with blue.
translate(.2,.2)
setfillcolor([100,100,0,0])
%Draw second rectangle using conventional commands
moveto(1,1) %Reset current point
lineto(3,1) %Draw first line
lineto(3,3) %Draw second line
lineto(1,3) %Draw third line
closepath() %Close shape
fill() %Draw shape
RectFillStroke (procedure)
Creates a rectangle that has both an outline and a fill color. You set the color for the outline using
setstrokecolor and the fill color using setfillcolor.
Syntax
rectfillstroke( x, y, width, height )
Arguments
x,y — Measure values representing the x and y coordinates respectively of the top left corner of the
rectangle.
width, height — Measure values specifying the width and height respectively of the rectangle.
RectStroke (procedure)
Creates and draws an empty rectangle shape. The colour of the pen used to draw the rectangle can be set
using setstrokecolor.
Syntax
rectstroke( x, y, width, height )