SOTRANSFORMSOTRANSFORM*
*Contents  *Index  *Topic Contents
*Previous Topic: SOTEXTINRECT
*Next Topic: SOVECTORHEADER

SOTRANSFORM

Contains information about a transformation for use with vector graphics output.

Syntax

typedef struct SOTRANSFORMtag {
    WORD wTransformFlags; 
    SOPOINT Origin; 
    INT xOffset; 
    INT yOffset; 
    SORATIO xScale; 
    SORATIO yScale; 
    SORATIO xSkew; 
    SORATIO ySkew; 
    SOANGLE RotationAngle; 
} SOTRANSFORM, VWPTR *PSOTRANSFORM;

Members

wTransformFlags
Type of transformation. This member can be a combination of these values:
SOTF_NOTRANSFORMSOTF_XSKEW
SOTF_ROTATESOTF_YOFFSET
SOTF_XOFFSETSOTF_YSCALE
SOTF_XSCALESOTF_YSKEW

SOTF_ROTATE may be combined only with SOTF_XOFFSET and SOTF_YOFFSET. Also, no other values may be combined with SOTF_NOTRANSFORM.

Origin
Point of origin for all transformations except SOTF_XOFFSET and SOTF_YOFFSET.
xOffset and yOffset
Offset values to use for the SOTF_XOFFSET and SOTF_YOFFSET transformations. The x and y members of this value are added to the x- and y-coordinates of all points in the transformed object.
xScale
Ratio to use for SOTF_XSCALE transformations. This ratio is used to scale the image on the x-axis from the given origin. To set this member, use the SOSETRATIO macro.
yScale
Ratio to use for SOTF_YSCALE transformations. This ratio is used to scale the image on the y-axis from the given origin. To set this member, use the SOSETRATIO macro.
xSkew
Ratio to use for SOTF_XSKEW transformations. This ratio is used to skew the image horizontally from the given origin. To set this member, use the SOSETRATIO macro.
ySkew
Ratio to use for SOTF_YSKEW transformations. This ratio is used to skew the image vertically from the given origin. To set this member, use the SOSETRATIO macro.
RotationAngle
Angle, in tenths of a degree, to use for SOTF_ROTATE transformations. All points are rotated this number of degrees about the given origin. This value must be set by using the SOANGLETENTHS macro. A SOANGLE variable should not be set directly.

The transformation equation follows:

x' = Origin.x + (xScale * (x-Origin.x)) + (xSkew*(y-Origin.y)) + xOffset
y' = Origin.y + (yScale * (y-Origin.y)) + (ySkew*(x-Origin.x)) + yOffset

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.