2.3.4.10 EmfPlusDrawLines Record

The EmfPlusDrawlLines record specifies drawing a series of connected lines.


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

Flags

Size

DataSize

Count

PointData (variable)

...

Type (2 bytes): An unsigned integer that identifies this record type as EmfPlusDrawlLines from the RecordType enumeration. The value MUST be 0x400D.

Flags (2 bytes): An unsigned integer that provides information about how the operation is to be performed, and about the structure of the record.


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

X

C

L

X

P

X

X

X

ObjectID

X (1 bit): Reserved and MUST be ignored.

C (1 bit): This bit indicates whether the PointData field specifies compressed data.

If set, PointData specifies absolute locations in the coordinate space with 16-bit signed integer coordinates. If clear, PointData specifies absolute locations in the coordinate space with 32-bit floating-point coordinates.

Note: If the P flag (below) is set, this flag is undefined and MUST be ignored.

L (1 bit): This bit indicates whether to draw an extra line between the last point and the first point, to close the shape.

P (1 bit): This bit indicates whether the PointData field specifies relative or absolute locations.

If set, each element in PointData specifies a location in the coordinate space that is relative to the location specified by the previous element in the array. In the case of the first element in PointData, a previous location at coordinates (0,0) is assumed. If clear, PointData specifies absolute locations according to the C flag.

Note: If this flag is set, the C flag (above) is undefined and MUST be ignored.<23>

ObjectID (1 byte): The index of an EmfPlusPen object in the EMF+ Object Table to draw the lines. The value MUST be zero to 63, inclusive.

Size (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes in the entire record. For this record type, the value MUST be one of the following.

Value

Meaning

0x00000014 ≤ value

If the P bit is set in the Flags field, the minimum Size is computed as follows:

 Size   = (Count * 0x00000002) + 0x00000010

0x00000018 ≤ value

If the P bit is clear and the C bit is set in the Flags field, Size is computed as follows:

 Size   = (Count * 0x00000004) + 0x00000010

0x00000020 ≤ value

If the P bit is clear and the C bit is clear in the Flags field, Size is computed as follows:

 Size   = (Count * 0x00000008) + 0x00000010

DataSize (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes of record-specific data that follows. For this record type, the value MUST be one of the following.

Value

Meaning

0x00000008 ≤ value

If the P bit is set in the Flags field, the minimum DataSize is computed as follows:

 DataSize   = (Count * 0x00000002) + 0x00000004

0x0000000C ≤ value

If the P bit is clear and the C bit is set in the Flags field, DataSize is computed as follows:

 DataSize   = (Count * 0x00000004) + 0x00000004

0x00000014 ≤ value

If the P bit is clear and the C bit is clear in the Flags field, DataSize is computed as follows:

 DataSize   = (Count * 0x00000008) + 0x00000004

Count (4 bytes): An unsigned integer that specifies the number of points in the PointData array. At least 2 points MUST be specified.

PointData (variable): An array of Count points that specify the starting and ending points of the lines to be drawn.

The type of data in this array is specified by the Flags field, as follows.

Data Type

Meaning

EmfPlusPointR object

If the P flag is set in the Flags, the points specify relative locations.

EmfPlusPoint object

If the P bit is clear and the C bit is set in the Flags field, the points specify absolute locations with 16-bit signed integer values.

EmfPlusPointF object

If the P bit is clear and the C bit is clear in the Flags field, the points specify absolute locations with 32-bit floating-point values.

See section 2.3.4 for the specification of additional drawing record types.