#define BEGIN_PATH 4096 |
short Control(lpDevice, BEGIN_PATH, NULL, NULL) | |||
LPPDEVICE lpDevice; |
The BEGIN_PATH escape opens a path. A path is a connected sequence of primitives drawn in succession to form a single polyline or polygon. Paths enable applications to draw complex borders, filled shapes, and clipping areas by supplying a collection of other primitives that define the desired shape.
Printer escapes that support paths enable applications to render images on sophisticated devices such as PostScript printers without generating huge polygons to simulate them.
To draw a path, an application first issues the BEGIN_PATH escape. It then draws the primitives defining the border of the desired shape, and issues an END_PATH and EXT_DEVICE_CAPS escape. The END_PATH escape includes a parameter specifying how the path is to be rendered.
lpDevice
Points to a PDEVICE structure specifying the destination device.
The return value is a short integer value specifying the current path nesting
level. If the escape is successful, the number of BEGIN_PATH calls without
a corresponding END_PATH call is the result. Otherwise, the result is zero.
You may open a path within another path. A path drawn within another path is treated exactly like a polygon (if the subpath is closed) or a polyline (if the subpath is open).
You may use the CLIP_TO_PATH escape to define a clipping area corresponding to the interior or exterior of the currently open path.
Device drivers that implement this escape must also implement the END_PATH and EXT_DEVICE_CAPS escapes and should also implement the SET_ARC_DIRECTION escape.