2 Structures

This section specifies the structures used to define the WMF, including:

This protocol references commonly used data types as defined in [MS-DTYP].

2.1 WMF Constants

2.1.1 WMF Enumerations

This section contains enumerations of constant values that are referenced in this specification.

2.1.1.1 RecordType Enumeration

The RecordType Enumeration defines the types of records that can be used in WMF metafiles.

2.3 WMF Records

This section specifies the WMF Records, which can be grouped into the following general categories.

Name Section Description
Bitmap record types 2.3.1 Manage and output bitmaps.
Control record types 2.3.2 Define the start and end of a WMF metafile.
Drawing record types 2.3.3 Perform graphics drawing orders.
Object record types 2.3.4 Create and manage graphics objects.
State record types 2.3.5 Specify and manage the graphics configuration.
Escape record types 2.3.6 Specify extensions to functionality that are not directly available through other records defined in the WMF RecordType Enumeration (section 2.1.1.1).

During the playback of a WMF metafile, a playback device context exists that can be described as a processing state in which every graphics object and property is defined. In the descriptions of WMF records that follow in this section, an element of the playback device context can be referred to as a "currently selected" graphics object or property. If a graphics object or property that is used in the output operation specified by a record has not been explicitly selected, a default value MUST be used. See Playback Device Context (section 3.1.5) for more information.

When a WMF metafile is processed, the order in which graphics output is performed MUST be the same as the order of drawing records in the metafile. Thus, a given drawing command is always rendered on top of the renderings of preceding commands.

WMF Record Structure

The following packet definition specifies the generic structure of all WMF records except Control records

RecordSize (4 bytes): A 32-bit unsigned integer that defines the number of 16-bit WORDs in the record.

RecordFunction (2 bytes): A 16-bit unsigned integer that defines the type of this record. The loworder byte MUST match the low-order byte of one of the values in the RecordType Enumeration.

rdParam (variable): An optional place holder that is provided for record-specific fields.


Maintained by John Loomis, last updated 12 April 2017