Important: The information in this document is obsolete and should not be used for new development.
RotateMapping
You can use theRotateMapping
function to change the rotation specified by a mapping.
gxMapping *RotateMapping(gxMapping *target, Fixed angle, Fixed xCenter, Fixed yCenter);
target
- A pointer to the mapping to be modified. On return, points to the modified mapping.
angle
- The amount of rotation (in degrees clockwise) to be added to the mapping
.
xCenter
- The x-coordinate of the center of rotation.
yCenter
- The y-coordinate of the center of rotation.
- function result
- A pointer to the modified mapping, which is also the target mapping.
DESCRIPTION
TheRotateMapping
function postmultiplies the target mapping by a mapping that specifies a rotation (clockwise if positive) by a specified number of degrees about the point (xCenter
,yCenter
).The rotation is in addition to any preexisting rotation specified by the target mapping.
Passing the result of this function to the
GXMapShape
function is equivalent to calling theGXMapShape
function and then calling theGXRotateShape
function. For example, you could make these calls (for the shapes
):
RotateMapping(target, angle, xCenter, yCenter); GXMapShape(s, target);or, you could make these equivalent calls:
GXMapShape(s, target); GXRotateShape(s, angle, xCenter, yCenter);ERRORS, WARNINGS, AND NOTICES
Errors mapping_is_nil SEE ALSO
The use of theRotateMapping
function is described in the section "Rotation" beginning on page 8-22.The
GXMapShape
andGXRotateShape
functions are described in the chapter "Transform Objects" in Inside Macintosh: QuickDraw GX Objects.