2.3.4.5 EmfPlusDrawCurve Record

The EmfPlusDrawCurve record specifies drawing a cardinal spline.


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

Tension

Offset

NumSegments

Count

PointData (variable)

...

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

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

X

X

X

X

ObjectID

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

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

If set, PointData contains an array of EmfPlusPoint objects. If clear, PointData contains an array of EmfPlusPointF objects.

ObjectID (1 byte): The index of an EmfPlusPen object in the EMF+ Object Table to draw the curve. 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, including the 12-byte record header and record-specific data.

At least 2 PointData elements MUST be specified in this record.

Value

Meaning

0x00000024 ≤ value

If the C bit is set in the Flags field, Count points with 16-bit signed integer values are defined in the PointData field. In this case, Size MUST be computed as follows:

 Size   = (Count * 0x00000004) + 0x0000001C

0x0000002C ≤ value

If the C bit is clear in the Flags field, Count points with 32-bit floating-point values are defined in the PointData field. In this case, Size MUST be computed as follows:

 Size   = (Count * 0x00000008) + 0x0000001C

DataSize (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes of record-specific data that follows.

At least 2 PointData elements MUST be specified in this record.

Value

Meaning

0x00000018 ≤ value

If the C bit is set in the Flags field, Count points with 16-bit signed integer values are defined in the PointData field. In this case, DataSize MUST be computed as follows:

 DataSize   = (Count * 0x00000004) + 0x00000010

0x00000020 ≤ value

If the C bit is clear in the Flags field, Count points with 32-bit floating-point values are defined in the PointData field. In this case, DataSize MUST be computed as follows:

 DataSize   = (Count * 0x00000008) +  0x00000010

Tension (4 bytes): A floating-point value that specifies how tightly the spline bends as it passes through the points. A value of 0 specifies that the spline is a sequence of straight lines. As the value increases, the curve becomes more rounded. For more information, see [SPLINE77] and [PETZOLD].

Offset (4 bytes): An unsigned integer that specifies the element in the PointData array that defines the starting point of the spline.

NumSegments (4 bytes): An unsigned integer that specifies the number of line segments making up the spline.

Count (4 bytes): An unsigned integer that specifies the number of points in the PointData array. The minimum number of points for drawing a curve is 2—the starting and ending points.

PointData (variable): An array of either 16-bit signed integers or 32-bit floating-point values of Count length that defines the coordinates of the endpoints of the lines to be stroked.

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