2.3.4.4 EmfPlusDrawClosedCurve Record
The EmfPlusDrawClosedCurve record specifies drawing a closed cardinal spline.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type |
Flags |
||||||||||||||||||||||||||||||
Size |
|||||||||||||||||||||||||||||||
DataSize |
|||||||||||||||||||||||||||||||
Tension |
|||||||||||||||||||||||||||||||
Count |
|||||||||||||||||||||||||||||||
PointData (variable) |
|||||||||||||||||||||||||||||||
... |
Type (2 bytes): An unsigned integer that identifies this record type as EmfPlusDrawClosedCurve from the RecordType enumeration. The value MUST be 0x4017.
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
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1X
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 locations in the coordinate space with 16-bit signed integer coordinates. If clear, PointData specifies 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.<21>
-
ObjectID (1 byte): The index of an EmfPlusPen object in the EMF+ Object Table to draw the closed 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. At least 3 points MUST be specified.
-
Value
Meaning
0x0000001C ≤ value
If the P bit is set in the Flags field, the minimum Size is computed as follows:
-
Size = ((((Count * 0x00000002) + 0x00000014 + 0x00000003) / 4) * 4)
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) + 0x00000014
0x0000002C ≤ 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) + 0x00000014
-
DataSize (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes of record-specific data in the record. At least 3 points MUST be specified.
-
Value
Meaning
0x00000010 ≤ value
If the P bit is set in the Flags field, the minimum DataSize is computed as follows:
-
DataSize = ((((Count * 0x00000002) + 0x0000008 + 0x00000003) / 4) * 4)
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) + 0x00000008
0x00000020 ≤ 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) + 0x00000008
-
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].
Count (4 bytes): An unsigned integer that specifies the number of points in the PointData field. At least 3 points MUST be specified.
PointData (variable): An array of Count points that specify the endpoints of the lines that define the spline. In a closed cardinal spline, the curve continues through the last point in the PointData array and connects with the first point in the array.
-
The type of data in this array is specified by the Flags field, as follows:
-
Data Type
Meaning
EmfPlusPointR object
If the P bit is set in the Flags field, 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 coordinates.
EmfPlusPointF object
If the P and C bits are clear in the Flags field, the points specify absolute locations with 32-bit coordinates.
See section 2.3.4 for the specification of additional drawing record types.