Important: The information in this document is obsolete and should not be used for new development.
SkewMapping
You can use theSkewMapping
function 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
TheSkewMapping
function postmultiplies the target mapping by a mapping that specifies a horizontal skew factor ofskewX
and a vertical skew factor ofskewY
, about the point (xCenter
,yCenter
). Note that ifskewX
is 0,yCenter
irrelevant; likewise, ifskewY
is 0,xCenter
is 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
SkewMapping
function to theGXMapShape
function is equivalent to calling theGXMapShape
function and then calling theGXSkewShape
function. 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 theSkewMapping
function is described in the section "Skewing" beginning on page 8-24.The
GXMapShape
andGXSkewShape
functions are described in the chapter "Transform Objects" in Inside Macintosh: QuickDraw GX Objects.