Contents of a Metafile

Every graphic function can be represented by one or more graphics orders. The operating system defines graphics orders for:

Editing Retained Graphics and Graphics Segments also describes orders and how to edit them.

When a picture is drawn in a presentation space associated with a metafile device context, the operating system converts the primitive attributes and drawing functions into graphics orders and stores them in the metafile.

The operating system stores the effects of region and other operations that are not permitted as escape orders in the metafile. When an application finishes playing a metafile, the system restores any regions that were defined for the presentation space prior to calling GpiPlayMetaFile.

An application can use any of the query functions while creating a metafile, but the system will not store those query functions in the metafile. Similarly, an application can set a value by using a mathematical operator, but the system will store only the result of the operation in the metafile. For example, if an application determines the end point of a line by subtracting 100 from the x- and y-coordinates of the upper-right corner of a window, the system records the end point, not the relative distance, in the metafile.

Because the output of bit map functions is dependent upon the capabilities of the output device, Gpi bit map functions might produce unexpected results when they are used in a metafile. If the pel dimensions of the output device are different from the pel dimensions of the device on which the metafile was created, the bit map will be distorted. If the output device is a plotter, the bit map functions will not work at all.

Most of the escape functions used by the DevEscape function can be used in metafiles. The escape functions that the system does not save in metafiles are DEVESC_QUERYESCSUPPORT and DEVESC_GETSCALINGFACTOR.


[Back: About Metafiles]
[Next: Metafile Content Restrictions]