Important: The information in this document is obsolete and should not be used for new development.
SkewMapping
You can use theSkewMappingfunction to change the horizontal and vertical skew specified by a mapping.
gxMapping *SkewMapping(gxMapping target, Fixed skewX, Fixed skewY, Fixed xCenter, Fixed yCenter);
target- A pointer to the mapping that is to be modified. On return, points to the modified mapping.
skewX- The scaling factor that determines the amount of skew in the x direction. A value of 0 means no horizontal skew.
skewY- The scaling factor that determines the amount of skew in the y direction. A value of 0 means no vertical skew.
xCenter- The x-coordinate of the center of skewing.
yCenter- The y-coordinate of the center of skewing.
- function result
- A pointer to the modified mapping, which is also the target mapping.
DESCRIPTION
TheSkewMappingfunction postmultiplies the target mapping by a mapping that specifies a horizontal skew factor ofskewXand a vertical skew factor ofskewY, about the point (xCenter,yCenter). Note that ifskewXis 0,yCenterirrelevant; likewise, ifskewYis 0,xCenteris irrelevant.These skew factors are in addition to any preexisting skew specified in the target mapping. The center of skewing specifies the point at which no translation takes place because of the skewing.
Passing the result of the
SkewMappingfunction to theGXMapShapefunction is equivalent to calling theGXMapShapefunction and then calling theGXSkewShapefunction. For example, you could make these calls (for the shapes):
SkewMapping(target, hFactor, vFactor, xCenter, yCenter); GXMapShape(s, target);or, you could make these equivalent calls:
GXMapShape(s, target); GXSkewShape(s, skewX, skewY, xCenter, yCenter);ERRORS, WARNINGS, AND NOTICES
Errors mapping_is_nil SEE ALSO
The use of theSkewMappingfunction is described in the section "Skewing" beginning on page 8-24.The
GXMapShapeandGXSkewShapefunctions are described in the chapter "Transform Objects" in Inside Macintosh: QuickDraw GX Objects.