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: QuickDraw GX Environment and Utilities /
Chapter 8 - QuickDraw GX Mathematics / QuickDraw GX Mathematics Reference
Mapping Functions / Modifying Mappings


RotateMapping

You can use the RotateMapping 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
The RotateMapping 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 the GXMapShape function and then calling the GXRotateShape function. For example, you could make these calls (for the shape s):

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 the RotateMapping function is described in the section "Rotation" beginning on page 8-22.

The GXMapShape and GXRotateShape functions are described in the chapter "Transform Objects" in Inside Macintosh: QuickDraw GX Objects.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996