SetRect
To assign coordinates to a rectangle, you can use the SetRect procedure.
PROCEDURE SetRect (VAR r:�Rect; left,top,right,bottom:�Integer);
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
The SetRect procedure assigns the coordinates you specify in the left, top, right, and bottom parameters to the rectangle that you specify in the r 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 a Rect record.
SEE ALSO
Listing 3-4 on page 3-19 illustrates how to use this procedure. The data structure of type Rect is described in the chapter "Basic QuickDraw."