SOTRANSFORM
Contains
information about a transformation for use with vector graphics output.
typedef struct SOTRANSFORMtag {
WORD wTransformFlags; // see below
SOPOINT
Origin; // see below
INT
xOffset; // see below
INT
yOffset; // see below
SORATIO
xScale; // see below
SORATIO
yScale; // see below
SORATIO
xSkew; // see below
SORATIO
ySkew; // see below
SOANGLE
RotationAngle; // see below
} SOTRANSFORM, VWPTR *PSOTRANSFORM;
Members
wTransformFlags
Type of
transformation. This member can be a combination of these values:
SOTF_NOTRANSFORM |
SOTF_XSKEW |
SOTF_ROTATE |
SOTF_YOFFSET |
SOTF_XOFFSET |
SOTF_YSCALE |
SOTF_XSCALE |
SOTF_YSKEW |
TSOTF_ROTATE may be combined only with SOTF_XOFFSET and SOTF_YOFFSET.
In addition, no other values may be combined with SOTF_NOTRANSFORM.
Origin
Point of
origin for all transformations, except for SOTF_XOFFSET and SOTF_YOFFSET.
xOffset
and yOffset
Offset values
to use for the SOTF_XOFFSET and OTF_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
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 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 used to skew the image vertically
from the given origin. To set this member, use the SOSETRATIO
RotationAngle
Angle, in
tenths of a degree, to use for SOTF_ROTATE transformations. All points are
rotated this many degrees about the given origin. This value must be set by
using the SOANGLETENTHS
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