Important: The information in this document is obsolete and should not be used for new development.
SetRect
To assign coordinates to a rectangle, you can use theSetRectprocedure.
PROCEDURE SetRect (VAR r:\xDDRect; left,top,right,bottom:\xDDInteger);
r- The rectangle to set.
left- The horizontal coordinate of the new upper-left corner of the rectangle.
top- The vertical coordinate of the new upper-left corner of the rectangle.
right- The horizontal coordinate of the new lower-right corner of the rectangle.
bottom- The vertical coordinate of the new lower-right corner of the rectangle.
DESCRIPTION
TheSetRectprocedure assigns the coordinates you specify in theleft,top,right, andbottomparameters to the rectangle that you specify in therparameter. This procedure is provided to help you shorten your program text. If you want a more readable text, at the expense of source text length, you can instead assign integers (or points) directly into the fields of aRectrecord.SEE ALSO
Listing 3-4 on page 3-19 illustrates how to use this procedure. The data structure of typeRectis described in the chapter "Basic QuickDraw."