2.3.7 Object Creation Record Types
The Object Creation record types create graphics objects.
The following are EMF object creation record types.
Name |
Section |
Description |
---|---|---|
EMR_CREATEBRUSHINDIRECT |
Defines a logical brush with a LogBrushEx object (section 2.2.12). |
|
EMR_CREATECOLORSPACE |
Defines a logical color space with a LogColorSpace object ([MS-WMF] section 2.2.2.11). |
|
EMR_CREATECOLORSPACEW |
Defines a logical color space with a LogColorSpaceW object ([MS-WMF] section 2.2.2.12). |
|
EMR_CREATEDIBPATTERNBRUSHPT |
Defines a pattern brush with a DeviceIndependentBitmap object ([MS-WMF] section 2.2.2.9). |
|
EMR_CREATEMONOBRUSH |
Defines a monochrome pattern brush with a monochrome DeviceIndependentBitmap object. |
|
EMR_CREATEPALETTE |
Defines a logical palette with a LogPalette object (section 2.2.17). |
|
EMR_CREATEPEN |
Defines a logical pen with a LogPen object (section 2.2.19). |
|
EMR_EXTCREATEFONTINDIRECTW |
Defines a logical font with either a LogFont object (section 2.2.13) or LogFontExDv object (section 2.2.15). |
|
EMR_EXTCREATEPEN |
Defines a logical pen with a LogPenEx object (section 2.2.20) and optional DeviceIndependentBitmap object. |
The generic structure of object creation records is specified as follows.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type |
|||||||||||||||||||||||||||||||
Size |
|||||||||||||||||||||||||||||||
ObjectRecordBuffer (variable) |
|||||||||||||||||||||||||||||||
... |
Type (4 bytes): An unsigned integer that defines the type of record. The object creation record types are listed in the following table. See the preceding table for descriptions of these record types.
-
Name
Value
EMR_CREATEMONOBRUSH
0x0000005D
EMR_CREATEDIBPATTERNBRUSHPT
0x0000005E
EMR_EXTCREATEPEN
0x0000005F
EMR_CREATECOLORSPACEW
0x0000007A
EMR_CREATEPEN
0x00000026
EMR_CREATEBRUSHINDIRECT
0x00000027
EMR_CREATEPALETTE
0x00000031
EMR_EXTCREATEFONTINDIRECTW
0x00000052
EMR_CREATECOLORSPACE
0x00000063
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 creation 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
1ObjectRecordParm (variable)
...
AlignmentPadding (variable, optional)
...
-
ObjectRecordParm (variable): An array of bytes that contains the parameters for the object creation 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.