2.3.5.1 EmfPlusObject Record

The EmfPlusObject record specifies an object for use in graphics operations. The object definition can span multiple records, which is indicated by the value of the Flags field.


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

TotalObjectSize (optional)

DataSize

ObjectData (variable)

...

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

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

C

ObjectType

ObjectID

C (1 bit): Indicates that the object definition continues on in the next EmfPlusObject record. This flag is never set in the final record that defines the object.

ObjectType (7 bits): The type of object to be created by this record, from the ObjectType enumeration.

ObjectID (1 byte): The index in the EMF+ Object Table to associate with the object created by this record. The value MUST be zero to 63, inclusive.

Size (4 bytes): An unsigned integer that specifies the 32-bit-aligned size of the entire record in bytes, including the 12-byte record header and the record-specific buffer data.

TotalObjectSize (4 bytes): If the record is continuable, when the continue bit is set, this field will be present. Continuing objects have multiple EMF+ records starting with EmfPlusContineudObjectRecord.  Each EmfPlusContinuedObjectRecord will contain a TotalObjectSize.  Once TotalObjectSize number of bytes has been read, the next EMF+ record will not be treated as part of the continuing object.

DataSize (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes of data in the record-specific data that follows. This number does not include the size of the invariant part of this record. For this record type, the value varies based on the size of object.

ObjectData (variable): An array of bytes that contains data for the type of object specified in the Flags field. The content and format of the data can be different for each object type. See the individual object definitions in section 2.2.1 for additional information.

The EmfPlusObject record is generic; it is used for all types of objects. Values that are specific to particular object types are contained in the ObjectData field. A conceptual model for managing graphics objects is described in Managing Graphics Objects.

See section 2.3.5 for the specification of additional object record types.