3.2 WMF Metafile Example

This section provides an example of a metafile which, when processed, renders the following image.

WMF metafile example

Figure 2: WMF metafile example

The contents of this metafile example are shown in the following in hexadecimal bytes. The far-left column is the byte count; the far-right characters are the interpretation of the bytes in the Latin-1 ANSI Character Set, as specified in [ISO/IEC-8859-1]. The sections that follow describe the packets that convey this series of bytes.

 00000000: 01 00 09 00 00 03 36 00 00 00 02 00 0C 00 00 00 …...6.........
 00000010: 00 00 08 00 00 00 FA 02 04 00 00 00 00 00 00 00 ......ú.........
 00000020: FF 00 04 00 00 00 2D 01 00 00 07 00 00 00 FC 02 ÿ.....-.......ü.
 00000030: 02 00 00 FF 00 FF 04 00 04 00 00 00 2C 01 01 00 ...ÿ.ÿ......,...
 00000040: 07 00 00 00 1B 04 46 00 96 00 00 00 00 00 0C 00 ......F.–.......
 00000050: 00 00 21 05 0C 00 48 65 6C 6C 6F 20 50 65 6F 70 ..!...Hello Peop
 00000060: 6C 65 0A 00 0A 00 03 00 00 00 00 00             le..........
  

Note When a WMF metafile is processed, the order in which graphics are rendered corresponds to the order of records in the metafile. This can create challenges for devices that have layers. For example, Printer Command Language (PCL) defines a graphics layer and a text layer. The text layer in PCL is always drawn on top of the graphics layer. Thus, when converting from metafile format to PCL, the converter, to generate the correct output, either detects text/graphic overlaps and sends the text down as graphics, or always sends the text as graphics.

The sections that follow provide definitions of the WMF header and records that correspond to this metafile. The WMF Object Table (section 3.1.4.1) refers to an indexed table of WMF Objects (section 2.2) that are defined in the metafile.