2.3.4.9 EmfPlusDrawImagePoints Record
The EmfPlusDrawImagePoints record specifies drawing a scaled image inside a parallelogram.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type |
Flags |
||||||||||||||||||||||||||||||
Size |
|||||||||||||||||||||||||||||||
DataSize |
|||||||||||||||||||||||||||||||
ImageAttributesID |
|||||||||||||||||||||||||||||||
SrcUnit |
|||||||||||||||||||||||||||||||
SrcRect |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
Count |
|||||||||||||||||||||||||||||||
PointData (variable) |
|||||||||||||||||||||||||||||||
... |
Type (2 bytes): An unsigned integer that identifies this record type as EmfPlusDrawImagePoints from the RecordType enumeration. The value MUST be 0x401B.
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
E
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.
-
E (1 bit): This bit indicates that the rendering of the image includes applying an effect.
-
If set, an object of the Effect class MUST have been specified in an earlier EmfPlusSerializableObject record.
-
-
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.<22>
-
ObjectID (1 byte): The index of an EmfPlusImage object in the EMF+ Object Table, which specifies the image to render. 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
0x00000030
If the P bit is set in the Flags field.
0x00000034
If the P bit is clear and the C bit is set in the Flags field.
0x00000040
If the P bit is clear and the C bit is clear in the Flags field.
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
0x00000024
If the P bit is set in the Flags field.
0x00000028
If the P bit is clear and the C bit is set in the Flags field.
0x00000034
If the P bit is clear and the C bit is clear in the Flags field.
ImageAttributesID (4 bytes): An unsigned integer that contains the index of the optional EmfPlusImageAttributes object in the EMF+ Object Table.
SrcUnit (4 bytes): A signed integer that defines the units of the SrcRect field. It MUST be the UnitPixel value of the UnitType enumeration.
SrcRect (16 bytes): An EmfPlusRectF object that defines a portion of the image to be rendered.
Count (4 bytes): An unsigned integer that specifies the number of points in the PointData array. Exactly 3 points MUST be specified.
PointData (variable): An array of Count points that specify three points of a parallelogram. The three points represent the upper-left, upper-right, and lower-left corners of the parallelogram. The fourth point of the parallelogram is extrapolated from the first three. The portion of the image specified by the SrcRect field SHOULD have scaling and shearing transforms applied if necessary to fit inside the parallelogram.
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.
An EmfPlusImage can specify either a bitmap or metafile.
Colors in an image can be manipulated during rendering. They can be corrected, darkened, lightened, and removed.
See section 2.3.4 for the specification of additional drawing record types.