short Escape(hdc, CLIP_TO_PATH, sizeof(int),lpClipMode, NULL)
The CLIP_TO_PATH printer escape defines a clipping region bounded by the currently open path. It enables the application to save and restore the current clipping region and to set up an inclusive or exclusive clipping region bounded by the currently open path. If the path defines an inclusive clipping region, portions of primitives falling outside the interior bounded by the path are clipped. If the path defines an exclusive clipping region, portions of primitives falling inside the interior are clipped.
hdc
HDC Identifies the device context.
lpClipMode
LPINT Points to a short integer that specifies the clipping mode. It can be one of the following values:
Value | Meaning |
CLIP_SAVE (0) | Saves the current clipping region. |
CLIP_RESTORE (1) | Restores the previous clipping region. |
CLIP_INCLUSIVE (2) | Sets an inclusive clipping region. |
CLIP_EXCLUSIVE (3) | Sets an exclusive clipping region. |
The return value specifies the outcome of the escape. This value is nonzero if the escape is successful. Otherwise, it is zero.
This escape is used only by PostScript printer drivers.
To clip a set of primitives against a path, an application should follow these steps:
1.Save the current clipping region by using the CLIP_TO_PATH escape.
2.Begin a path with the BEGIN_PATH escape.
3.Draw the primitives bounding the clipping region.
4.Close the path with the END_PATH escape.
5.Set the clipping region by using the CLIP_TO_PATH escape.
6.Draw the primitives to be clipped.
7.Restore the original clipping region by using the CLIP_TO_PATH escape.