2.3.8 Object Manipulation Record Types

The Object Manipulation record types manage and modify graphics objects.

The following are EMF object manipulation record types.

Name

Section

Description

EMR_COLORCORRECTPALETTE

2.3.8.1

Specifies how to correct the entries of a LogPalette object (section 2.2.17) by using WCS values.

EMR_DELETECOLORSPACE

2.3.8.2

Specifies how to delete a logical color space from the EMF object table (section 3.1.1.1).

EMR_DELETEOBJECT

2.3.8.3

Specifies the index of the object to be deleted from the EMF object table.

EMR_RESIZEPALETTE

2.3.8.4

Increases or decreases the size of an existing LogPalette object.

EMR_SELECTOBJECT

2.3.8.5

Specifies an existing object based on its index in the EMF object table and selects it into the playback device context

EMR_SELECTPALETTE

2.3.8.6

Selects the specified LogPalette object into the playback device context.

EMR_SETCOLORSPACE

2.3.8.7

Specifies a logical color space, based on its index in the EMF object table.

EMR_SETPALETTEENTRIES

2.3.8.8

Defines RGB color values in a range of entries for an existing LogPalette object.

The generic structure of object manipulation records is specified as follows.


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

Size

ObjectRecordBuffer (variable)

...

Type (4 bytes): An unsigned integer that defines the type of record. The object manipulation record types are listed in the following table. See the preceding table for descriptions of these record types.

Name

Value

EMR_SELECTOBJECT

0x00000025

EMR_DELETEOBJECT

0x00000028

EMR_SELECTPALETTE

0x00000030

EMR_SETPALETTEENTRIES

0x00000032

EMR_RESIZEPALETTE

0x00000033

EMR_SETCOLORSPACE

0x00000064

EMR_DELETECOLORSPACE

0x00000065

EMR_COLORCORRECTPALETTE

0x0000006F

Size (4 bytes): An unsigned integer that specifies the size in bytes of this record in the metafile. This value MUST be a multiple of 4 bytes.

ObjectRecordBuffer (variable): An array of bytes that contains the remainder of the object manipulation 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

ObjectRecordParm (variable)

...

AlignmentPadding (variable, optional)

...

ObjectRecordParm (variable): An array of bytes that contains the parameters for the object manipulation record.

AlignmentPadding (variable, optional): An array of up to 3 bytes that pads the record so that its total size is a multiple of 4 bytes. This field MUST be ignored.

See section 2.3 for more EMF record types.