BEGIN_PATH

Syntax

short Escape(hDC, BEGIN_PATH, NULL, NULL, NULL)

This 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 supporting paths enable applications to render images on sophisticated devices such as PostScriptÒ printers without generating huge polygons to simulate the images.

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 escape. The END_PATH escape includes a parameter specifying how the path is to be rendered.

Parameter Type/Description  

hDC HDC Identifies the device context.  

Return Value

The return value specifies the current path nesting level. If the escape is successful, the return value is the number of BEGIN_PATH escape calls without a corresponding END_PATH escape call. Otherwise, the return value is zero.

Comments

An application may begin a subpath within another path. If the subpath is closed, it is treated exactly like a polygon. If it is open, it is treated exactly like a polyline.

An application may use the CLIP_TO_PATH escape to define a clipping area corresponding to the interior or exterior of the currently open path.