2.3.4.3 EmfPlusDrawBeziers Record

The EmfPlusDrawBeziers record specifies drawing a sequence of connected Bezier curves. The order for Bezier data points is the start point, control point 1, control point 2 and end point. For more information see [MSDN-DrawBeziers].


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 EmfPlusDrawBeziers from the RecordType enumeration. The value MUST be 0x4019.

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

X

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 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.

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.<19>

ObjectID (1 byte): The index of an EmfPlusPen object in the EMF+ Object Table to draw the Bezier curves. 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. At least 4 points MUST be specified.

Value

Meaning

0x00000018 ≤ value

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

 Size   = (Count * 0x00000002) + 0x00000010

0x00000020 ≤ 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

0x00000030 ≤ 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 in the entire record. At least 4 points MUST be specified.

Value

Meaning

0x0000000C ≤ value

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

 DataSize   = (Count * 0x00000002) + 0x00000004

0x00000014 ≤ 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

0x00000024 ≤ 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 4 points MUST be specified.

PointData (variable): An array of Count points that specify the starting, ending, and control points of the Bezier curves. The ending coordinate of one Bezier curve is the starting coordinate of the next. The control points are used for producing the Bezier effect.

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.

EmfPlusPointF object

If the P and C bits are clear in the Flags field, the points specify absolute locations.

EmfPlusPoint object

If the P bit is clear and the C bit is set in the Flags field, the points specify relative locations.

A Bezier curve does not pass through its control points. The control points act as magnets, pulling the curve in certain directions to influence the way the lines bend.

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