GreMultiplyXforms: Difference between revisions
Appearance
Created page with "GreMultiplyXforms multiplies the transform matrix. This function can be hooked by the presentation driver. ;Simulation support: This function is simulated by a handling ro..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreMultiplyXforms multiplies the transform matrix. | GreMultiplyXforms multiplies the transform matrix. | ||
This function can be hooked by the presentation driver. | This function can be hooked by the presentation driver. | ||
;Simulation support: This function is simulated by a handling routine in the graphics engine. | ;Simulation support: This function is simulated by a handling routine in the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreMultiplyXforms(hdc, paXform, paNewXformData, lMode, pInstance, lFunction) | GreMultiplyXforms(hdc, paXform, paNewXformData, lMode, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;paXform (PXFORM) - output:On input: Transform used during lMode operation. | ||
:On output: Result of the lMode operation. | |||
;paXform (PXFORM) - output | ;paNewXformData (PXFORM) - input:Transform used during lMode operation. | ||
:On input: Transform used during lMode operation. | ;lMode (LONG) - input:Specifies how supplied array is used to set matrix: | ||
:*SX_UNITY Set unity transform, ignore array values | |||
:On output: Result of the lMode operation. | :*SX_CAT_AFTER Concatenate after | ||
:*SX_CAT_BEFORE Concatenate before | |||
;paNewXformData (PXFORM) - input | :*SX_OVERWRITE Overwrite | ||
:Transform used during lMode operation. | ;pInstance (PVOID) - input:Pointer to instance data. | ||
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreMultiplyXforms. | |||
;lMode (LONG) - input | |||
:Specifies how supplied array is used to set matrix: | |||
:*SX_UNITY Set unity transform, ignore array values | |||
:*SX_CAT_AFTER Concatenate after | |||
:*SX_CAT_BEFORE Concatenate before | |||
:*SX_OVERWRITE Overwrite | |||
;pInstance (PVOID) - input | |||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreMultiplyXforms. | |||
==Return Code== | ==Return Code== | ||
;fSuccess (BOOL) - returns | ;fSuccess (BOOL) - returns:Return codes. | ||
:Return codes. | :This function returns BOOLEAN (fSuccess). | ||
:*TRUE Successful | |||
:This function returns BOOLEAN (fSuccess). | :*FALSE Error | ||
:Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | |||
:*TRUE Successful | :*PMERR_INV_MATRIX_ELEMENT | ||
:*FALSE Error | :*PMERR_INV_TRANSFORM_TYPE | ||
:Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation. | |||
:Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | |||
:*PMERR_INV_MATRIX_ELEMENT | |||
:*PMERR_INV_TRANSFORM_TYPE | |||
:Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation. | |||
==Remarks== | ==Remarks== | ||
This function multiplies the transform matrix (defined by paNewXformData) by the corresponding matrix in paXform. The result is stored in paXform. When this function is used to make a series of matrix multiplications on the same matrix, some loss of accuracy can occur due to rounding because no higher precision can be retained across calls. | This function multiplies the transform matrix (defined by paNewXformData) by the corresponding matrix in paXform. The result is stored in paXform. When this function is used to make a series of matrix multiplications on the same matrix, some loss of accuracy can occur due to rounding because no higher precision can be retained across calls. | ||
==Declaration== | ==Declaration== | ||
Line 58: | Line 39: | ||
#include <os2.h> | #include <os2.h> | ||
HDC hdc; | HDC hdc; /* Device context handle. */ | ||
PXFORM paXform; | PXFORM paXform; | ||
PXFORM paNewXformData; | PXFORM paNewXformData; | ||
LONG lMode; | LONG lMode; /* Specifies how supplied array is used to set matrix: */ | ||
PVOID pInstance; | PVOID pInstance; /* Pointer to instance data. */ | ||
ULONG lFunction; | ULONG lFunction; | ||
BOOL fSuccess; | BOOL fSuccess; /* Return codes. */ | ||
fSuccess = GreMultiplyXforms(hdc, paXform, paNewXformData, lMode, pInstance, lFunction); | |||
</PRE> | </PRE> | ||
[[Category:Gre]] | [[Category:Gre]] |
Latest revision as of 17:32, 7 February 2020
GreMultiplyXforms multiplies the transform matrix.
This function can be hooked by the presentation driver.
- Simulation support
- This function is simulated by a handling routine in the graphics engine.
Syntax
GreMultiplyXforms(hdc, paXform, paNewXformData, lMode, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- paXform (PXFORM) - output
- On input: Transform used during lMode operation.
- On output: Result of the lMode operation.
- paNewXformData (PXFORM) - input
- Transform used during lMode operation.
- lMode (LONG) - input
- Specifies how supplied array is used to set matrix:
- SX_UNITY Set unity transform, ignore array values
- SX_CAT_AFTER Concatenate after
- SX_CAT_BEFORE Concatenate before
- SX_OVERWRITE Overwrite
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreMultiplyXforms.
Return Code
- fSuccess (BOOL) - returns
- Return codes.
- This function returns BOOLEAN (fSuccess).
- TRUE Successful
- FALSE Error
- Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
- PMERR_INV_MATRIX_ELEMENT
- PMERR_INV_TRANSFORM_TYPE
- Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.
Remarks
This function multiplies the transform matrix (defined by paNewXformData) by the corresponding matrix in paXform. The result is stored in paXform. When this function is used to make a series of matrix multiplications on the same matrix, some loss of accuracy can occur due to rounding because no higher precision can be retained across calls.
Declaration
#define INCL_GRE_XFORMS #include <os2.h> HDC hdc; /* Device context handle. */ PXFORM paXform; PXFORM paNewXformData; LONG lMode; /* Specifies how supplied array is used to set matrix: */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; BOOL fSuccess; /* Return codes. */ fSuccess = GreMultiplyXforms(hdc, paXform, paNewXformData, lMode, pInstance, lFunction);