7.4

Table Of Contents
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 set-
strokecolor.
Syntax
rectstroke( x, y, width, height )
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.
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
©2010 Objectif Lune Inc - 580 -