Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
GpiRotate (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPITRANSFORMS
BOOL GpiRotate(hps, pmatlf, flType, fxAngle, pptl)
HPS hps; /* presentation-space handle */
PMATRIXLF pmatlf; /* pointer to structure with matrix */
LONG flType; /* transformation type */
FIXED fxAngle; /* pointer to variable with rotation angle */
PPOINTL pptl; /* pointer to structure with center point */
The GpiRotate function creates a transformation that can be used to rotate
objects around a given point. GpiRotate either adds the specified rotation
to an existing transformation or replaces the existing transformation with
the rotation. The new transformation can be used in a subsequent call to any
transformation function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
pmatlf Points to the MATRIXLF structure that contains the transformation
matrix.
flType Specifies how the specified matrix should be used to modify the
transformation. It can be one of the following values:
Value Meaning
─────────────────────────────────────────────────────────────────
TRANSFORM_ADD Additive. The specified transformation matrix
is combined with the existing transformation,
with the existing transformation first, the
new transformation second. This option is
useful for incremental updates to
transformations.
TRANSFORM_REPLACE New/replace. The previous transformation is
discarded and replaced by the specified
transformation matrix.
fxAngle Specifies the rotation (in degrees) to use.
pptl Points to the POINTL structure that contains the coordinates of a
point, relative to the origin, that defines the center of
rotation.
Return Value
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurs.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
the following:
PMERR_INV_TRANSFORM_TYPE
See Also
GpiScale, GpiSetDefaultViewMatrix, GpiSetModelTransformMatrix,
GpiSetSegmentTransformMatrix, GpiSetViewingTransformMatrix, GpiTranslate,
WinGetLastError, FIXED, MATRIXLF, POINTL
♦