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.
GpiScale (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPITRANSFORMS
BOOL GpiScale(hps, pmatlf, flType, afxScale, pptl)
HPS hps; /* presentation-space handle */
PMATRIXLF pmatlf; /* pointer to structure for matrix */
LONG flType; /* transformation type */
PFIXED afxScale; /* pointer to variable with scaling factor */
PPOINTL pptl; /* pointer to structure with point data */
The GpiScale function creates a transformation that can be used to scale
(expand or contract) an object relative to a given point. GpiScale either
adds the specified scaling factor 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.
afxScale Points to the two-element array that contains the scaling factors
to use. The first element specifies the scaling factor along the
x-axis; the second specifies the scaling factor along the
y-axis.
pptl Points to the POINTL structure that contains the coordinates of
the point, relative to the origin, that defines the center of the
scale.
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, GpiSetDefaultViewMatrix, GpiSetModelTransformMatrix,
GpiSetSegmentTransformMatrix, GpiSetViewingTransformMatrix, GpiTranslate,
WinGetLastError, FIXED, MATRIXLF, POINTL
♦