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


OffsetRect

To move a rectangle, use the OffsetRect procedure.

PROCEDURE OffsetRect (VAR r:\xDDRect; dh,dv:\xDDInteger); 
r
The rectangle to move.
dh
The horizontal distance to move the rectangle.
dv
The vertical distance to move the rectangle.
DESCRIPTION
The OffsetRect procedure moves the rectangle that you specify in the r parameter by adding the value you specify in the dh parameter to each of its horizontal coordinates and the value you specify in the dv parameter to each of its vertical coordinates. If the dh and dv parameters are positive, the movement is to the right and down; if either is negative, the corresponding movement is in the opposite direction. The rectangle retains its shape and size; it's merely moved on the coordinate plane. The movement doesn't affect the screen unless you subsequently call a routine to draw within the rectangle.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996