|
About Metafiles
A metafile is a collection of structures that store a picture in a device-independent
format. Device independence is the one feature that sets metafiles apart from
bitmaps: unlike a bitmap, a metafile guarantees device independence. For example,
when an application creates a picture measuring 2 by 2 inches on a VGA display
and stores that picture in a metafile, the picture maintains its original
dimensions when printed on a 300 dpi laser printer or copied over a network and
displayed in another application that is running on an 8514/A video display. There
is a drawback to metafiles, however; they are generally drawn more slowly than
bitmaps. Therefore, if an application requires fast drawing and device
independence is not an issue, it should use bitmaps instead of metafiles.
Internally, a metafile is an array of variable-length structures called metafile records. The first records in the metafile specify general information such as the
resolution of the device on which the picture was created, the dimensions of the
picture, and so on. The remaining records, which constitute the bulk of any
metafile, correspond to the graphics device interface (GDI) functions required to
draw the picture. These records are stored in the metafile after a special
metafile device context (DC) is created. This DC is then used for all drawing
operations required to create the picture. When Windows processes a GDI function
associated with a metafile DC, it converts the function into the appropriate data
and stores this data in a record appended to the metafile.
After a picture is complete and the last record is stored in the metafile, the
metafile can be passed to another application by means of the clipboard,
embedded within another file, stored on disk, or played repeatedly. A metafile is played when its records are converted to device commands and processed by the
appropriate device.
There are two types of metafiles: enhanced and Windows. An enhanced metafile is used in applications written using the Microsoft® Win32® application programming interface (API). The enhanced format consists of a
header, a table of handles to GDI objects, a private palette, and an array of
metafile records. Enhanced metafiles provide true device independence. (You can
think of the picture stored in an enhanced metafile as a "snapshot" of the video
display taken at a particular moment. This "snapshot" maintains its dimensions
no matter where it appears: on a printer, a plotter, or the desktop, or in the
client area of any Win32-based application.)
A Windows metafile is used for applications written using the Windows version 3.x API. The Windows format consists of a header and an array of metafile
records. Windows-format metafiles are limited in their capabilities and should rarely
be used the Windows-metafile API is supported to maintain backward compatibility with
applications that were written to run with Windows version 3.x.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|