Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 3 - QuickDraw Drawing / QuickDraw Drawing Reference
Routines / Creating and Managing Rectangles


SetRect

To assign coordinates to a rectangle, you can use the SetRect 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
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."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996