TransformRect
TheTransformRectfunction allows your application to transform the upper-left and lower-right points of a rectangle through a specified matrix.
pascal Boolean TransformRect (MatrixRecordPtr m, Rect *r, FixedPoint *fpp);
m- Specifies the matrix for this operation.
r- Contains a pointer to the structure that defines the rectangle to be transformed. The
TransformRectfunction returns the updated coordinates into the structure referred to by this parameter. If the resulting rectangle has been rotated or skewed (that is, the transformation involves operations other than scaling and translation), the function sets the returned Boolean value tofalseand returns the coordinates of the rectangle that encloses the transformed rectangle. The function then updates the points specified by thefppparameter to contain the coordinates of the four corners of the transformed rectangle.fpp- Contains a pointer to an array of four fixed points. The
TransformRectfunction returns the coordinates of the four corners of the rectangle after the transformation operation.- If you do not want this information, set this parameter to
nil.DESCRIPTION
TheTransformRectfunction returns a Boolean value indicating the nature of the result rectangle. If the matrix defines transformations other than translation and scaling, theTransformRectfunction sets the returned value tofalse, updates the rectangle specified by therparameter to define the boundary box of the resulting rectangle, and places the coordinates of the corners of the resulting rectangle in the points specified by thefppparameter. If the transformed rectangle and its boundary box are the same, the function sets the returned value totrue.ERROR CODES
None
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help