6.0

Table Of Contents
131
Arguments
x, y — Measure values representing the horizontal/vertical position, in inches, of the starting point.
width, height — Measure values representing the width/height, in inches, of the rectangle shape.
Code Sample Example
This example draws two identical rectangles.
Note: To draw a rectangle that is both stroked and filled, use rectstroke and rectfill in succession.
Example
rectstroke(1,1,2,2) %Draw first rectangle
%Offset starting position slightly to distinguish
%between each rectangle; the second rectangle is blue.
translate(.2,.2)
setstrokecolor([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
stroke() %Draw shape
Repeat... Until (procedure)
Repeat a sequence of commands until a condition is true. It is similar to a for... endfor loop in that you can
nest the loops. It is different from a for... endfor loop in that the loop always executes at least once, and
that you tie the number of times the loop repeats to a Boolean condition. For example you might tie the
number of times the loop repeats to the occurrence of a piece of data in the data stream.
Syntax
repeat
until( expression )