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.
RESTORE_CTM
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define RESTORE_CTM 4100 
short Control(lpDevice, RESTORE_CTM, NULL, NULL)
LPPDEVICE lpDevice;
 
The RESTORE_CTM escape restores the current, previously saved 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 picture.
 
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 -1 if the escape is unsuccessful.
 
Comments
 
Applications should not make any assumptions about the initial 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,
SAVE_CTM, and TRANSFORM_CTM escapes.
 
See Also
 
SAVE_CTM, SET_CLIP_BOX, TRANSFORM_CTM, PDEVICE
 
 
                                      ♦