GpiQueryModelTransformMatrix: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This function returns the current model transform | This function returns the current model transform | ||
==Syntax== | ==Syntax== | ||
GpiQueryModelTransformMatrix(hps, lCount, pmatlfArray); | GpiQueryModelTransformMatrix(hps, lCount, pmatlfArray); | ||
==Parameters== | ==Parameters== |
Latest revision as of 14:17, 7 April 2025
This function returns the current model transform
Syntax
GpiQueryModelTransformMatrix(hps, lCount, pmatlfArray);
Parameters
- hps (HPS) - input
- Presentation-space handle.
- lCount (LONG) - input
- Number of elements.
- The number of elements to be returned in pmatlfArray; must be in the range 0 through 9. If 0 is specified, no matrix elements are returned.
- pmatlfArray (PMATRIXLF) - output
- Transform matrix.
- A structure in which the elements of the model transform matrix are returned.
Return Value
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Remarks
This function is invalid when the drawing mode (see GpiSetDrawingMode) is set to retain.
Errors
Possible returns from WinGetLastError:
- PMERR_INV_HPS (0x207F)
- An invalid presentation-space handle was specified.
- PMERR_PS_BUSY (0x20F4)
- An attempt was made to access the presentation space from more than one thread simultaneously.
- PMERR_INV_IN_RETAIN_MODE (0x208C)
- An attempt was made to issue a function (for example, query) that is invalid when the actual drawing mode is not draw or draw-and-retain.
- PMERR_INV_LENGTH_OR_COUNT (0x2092)
- An invalid length or count parameter was specified.
- PMERR_INV_DC_TYPE (0x2060)
- An invalid type parameter was specified with DevOpenDC, or a function was issued that is invalid for a OD_METAFILE_NOQUERY device context.
Example Code
#define INCL_GPITRANSFORMS /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ LONG lCount; /* Number of elements. */ PMATRIXLF pmatlfArray; /* Transform matrix. */ BOOL rc; /* Success indicator. */ rc = GpiQueryModelTransformMatrix(hps, lCount, pmatlfArray);
This example uses GpiQueryModelTransformMatrix to query the first element of the current model transform after setting the draw mode to DRAW.
#define INCL_GPITRANSFORMS /* Transform functions */ #define INCL_GPICONTROL /* Control functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HPS hps; /* Presentation-space handle */ LONG lCount; /* number of elements */ MATRIXLF pmatlfArray; /* transform matrix */ lCount = 1; /* examine only first element of transform matrix */ if (GpiSetDrawingMode(hps, DM_DRAW) == TRUE) fSuccess = GpiQueryModelTransformMatrix(hps, lCount, &pmatlfArray);