gpi12.hlp (Table of Contents; Topic list)
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.
GpiSetViewingTransformMatrix (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPITRANSFORMS
 
BOOL GpiSetViewingTransformMatrix(hps, cElements, pmatlf, flType)
HPS hps;             /* presentation-space handle                       */
LONG cElements;      /* number of elements                              */
PMATRIXLF pmatlf;    /* address of structure with transformation matrix */
LONG flType;         /* transformation type                             */
 
The GpiSetViewingTransformMatrix function sets the viewing transformation.
The viewing transformation applies to all primitives inside subsequently
opened (new) segments (it has no effect on primitives outside segments). All
graphics primitives in a segment have the same viewing transformation, since
the function cannot be used in an open segment. Also, once set for a
segment, the viewing transformation cannot be altered.
 
The GpiSetViewingTransformMatrix function sets the transformation by
replacing the existing transformation matrix with the matrix pointed to by
the pmatlf parameter. The function replaces the existing transformation
matrix as specified by the flType parameter. The function requires a
nine-element matrix to set the 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. If scaling values greater than one
are given, care must be taken that the combined effect of this and any other
relevant transformations do not exceed the limit for fixed-point numbers.
 
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 through 9.
 
pmatlf     Points to the MATRIXLF structure that contains the transformation
           matrix.
 
flType     Specifies the transform type. It can be TRANSFORM_REPLACE. The
           previous viewing transformation is discarded and replaced by a
           specified transformation.
 
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
one of the following:
 
     PMERR_INV_HPS
     PMERR_INV_IN_SRG
     PMERR_INV_LENGTH_OR_COUNT
     PMERR_INV_MATRIX_ELEMENT
     PMERR_INV_MICROPS_FUNCTION
     PMERR_INV_TRANSFORM_TYPE
     PMERR_PS_BUSY
 
See Also
 
GpiQueryDefaultViewMatrix, GpiQueryViewingTransformMatrix, WinGetLastError,
MATRIXLF