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.
GpiSetDefaultViewMatrix (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPITRANSFORMS
BOOL GpiSetDefaultViewMatrix(hps, cElements, pmatlf, flType)
HPS hps; /* presentation-space handle */
LONG cElements; /* number of elements */
PMATRIXLF pmatlf; /* address of structure with transform matrix */
LONG flType; /* transformation type */
The GpiSetDefaultViewMatrix function sets the default viewing
transformation. The function sets the transformation by adding or replacing
the existing transformation matrix with the matrix pointed to by the pmatlf
parameter. The function adds, preempts, or replaces the existing
transformation matrix as specified by the flType parameter.
The GpiSetDefaultViewMatrix function requires a nine-element matrix to set
the default viewing transformation. If the specified matrix does not contain
nine elements, the function uses the corresponding elements of the identity
matrix for each unspecified element. The cElements parameter specifies the
number of elements in the matrix. If this parameter equals zero, the
identity matrix is used.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
cElements Specifies the number of elements in the matrix to set. It can be
any integer in the range 0 to 9.
pmatlf Points to a MATRIXLF structure that contains the transformation
matrix.
flType Specifies how a specified transformation matrix should be used to
modify the default viewing transformation. It can be one of the
following values:
Value Meaning
─────────────────────────────────────────────────────────────────
TRANSFORM_ADD Additive. The specified transformation matrix
is combined with the existing default viewing
transformation, in the order of the existing
transformation first, the new transformation
second. This option is useful for incremental
updates to transformations.
TRANSFORM_PREEMPT Preemptive. The specified transformation
matrix is combined with the existing default
viewing transformation, in the order of the
new transformation first, the existing
transformation second.
TRANSFORM_REPLACE New/replace. The previous default viewing
transformation is discarded and replaced by
the specified transformation matrix.
Return Value
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
the following:
PMERR_INV_HPS
PMERR_INV_LENGTH_OR_COUNT
PMERR_INV_MATRIX_ELEMENT
PMERR_INV_TRANSFORM_TYPE
PMERR_PS_BUSY
See Also
GpiQueryDefaultViewMatrix, WinGetLastError, MATRIXLF
♦