#define SAVE_CTM 4101 |
short Control(lpDevice, SAVE_CTM, NULL, NULL) | |||
LPPDEVICE lpDevice; |
The SAVE_CTM escape saves the current transformation matrix (CTM). The CTM controls the manner in which coordinates are translated, rotated, and scaled by the device. By using matrixes, you can combine these operations in any order to produce the desired mapping for a particular image.
You can restore the matrix by using the RESTORE_CTM escape.
An application typically saves the CTM before changing it. This enables the application to restore the previous state upon completion of a particular operation.
lpDevice
Points to a PDEVICE structure specifying the destination device.
The return value is the number of SAVE_CTM escapes without a corresponding RESTORE_CTM escape. The return value is zero if the escape is unsuccessful.
Applications should not make any assumptions about the initial contents of the CTM and are expected to restore the contents of the CTM.
When a driver transforms a primitive using a transformation matrix modified by the application, it should ignore the clipping rectangle specified by GDI. Applications should specify the desired clipping rectangle using the SET_CLIP_BOX escape.
Drivers supporting this escape must also implement the SET_CLIP_BOX, RESTORE_CTM, and TRANSFORM_CTM escapes.