Windows 3.1 Device Drivers (ddag31qh.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.
SAVE_CTM
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#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.
Parameter Description
────────────────────────────────────────────────────────────────────────────
lpDevice Points to a PDEVICE structure specifying the destination device.
Return Value
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.
Comments
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.
See Also
RESTORE_CTM, SET_CLIP_BOX, TRANSFORM_CTM, PDEVICE
♦