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.
GpiTranslate (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPITRANSFORMS
BOOL GpiTranslate(hps, pmatlf, flType, pptl)
HPS hps; /* presentation-space handle */
PMATRIXLF pmatlf; /* pointer to structure with matrix */
LONG flType; /* transformation type */
PPOINTL pptl; /* pointer to structure with point data */
The GpiTranslate function creates a transformation that can be used to
translate (move) an object a specified direction and distance. GpiTranslate
either adds the specified translation to an existing transformation or
replaces the existing transformation. 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 a 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.
pptl Points to the POINTL structure that contains the coordinates of a
point, relative to the origin, that defines the required
translation.
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
GpiRotate, GpiScale, GpiSetDefaultViewMatrix, GpiSetModelTransformMatrix,
GpiSetSegmentTransformMatrix, GpiSetViewingTransformMatrix, WinGetLastError,
MATRIXLF, POINTL
♦