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 theSetRect
procedure.
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
TheSetRect
procedure assigns the coordinates you specify in theleft
,top
,right
, andbottom
parameters to the rectangle that you specify in ther
parameter. 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 aRect
record.SEE ALSO
Listing 3-4 on page 3-19 illustrates how to use this procedure. The data structure of typeRect
is described in the chapter "Basic QuickDraw."