2.3.10 Path Bracket Record Types

The Path Bracket record types are used to construct a path bracket, which defines the current path in the playback device context.

Note: None of the path bracket records specify parameters.

The following are the path bracket record types.

Name

Description

EMR_ABORTPATH

This record closes path bracket construction and discards the current path.

EMR_BEGINPATH

This record opens path bracket construction.

Once path bracket construction is open, an application can begin specifying records to define the points that lie in the path. Path bracket construction MUST be closed by an EMR_ABORTPATH or EMR_ENDPATH record.

When an application processes an EMR_BEGINPATH record, path bracket construction MUST NOT be open.

EMR_CLOSEFIGURE

This record closes the figure in path bracket construction.

Processing the EMR_CLOSEFIGURE record closes the figure by drawing a line from the current drawing position to the first point of the figure, and then it connects the lines by using the current line join. If the figure is closed by processing an EMR_LINETO record (section 2.3.5.13) instead of this record, the current line cap is used to create the corner instead of the line join. The line parameters are specified by the PenStyle field in the current LogPen (section 2.2.19) and LogPenEx (section 2.2.20) objects.

The EMR_CLOSEFIGURE record SHOULD be used only if there is an open figure in the path bracket. A figure in a path is open unless it is explicitly closed by processing this record. A figure can be open even if the current point is the same as the starting point.

After processing the EMR_CLOSEFIGURE record, adding a line or curve to the path bracket starts a new figure.

EMR_ENDPATH

This record closes path bracket construction and selects the path into the playback device context.

EMR_FLATTENPATH

This record transforms each curve in the current path into a sequence of lines.

EMR_WIDENPATH

This record redefines the current path as the area that would be painted if its path were drawn using the current pen.

The generic structure of path bracket records is specified as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Type

Size

Type (4 bytes): An unsigned integer that defines the type of the record. The types of records that specify no parameters are listed in the following table. See the preceding table for descriptions of these records.

Name

Value

EMR_BEGINPATH

0x0000003B

EMR_ENDPATH

0x0000003C

EMR_CLOSEFIGURE

0x0000003D

EMR_FLATTENPATH

0x00000041

EMR_WIDENPATH

0x00000042

EMR_ABORTPATH

0x00000044

Size (4 bytes): An unsigned integer that specifies the size in bytes of this record in the metafile. For path bracket records, this value is 0x00000008

See section 2.3 for more EMF record types.