* Merge winforms framework content to working branch (#14) * Breadcrumb / TOC / Move net5 to net folder (#15) * change path from net5 to net * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Add .net 5 winforms placeholder article (#16) * added some metadata and adjusted net5 placeholder * corrections * corrections * corrections * Test1 * Swapping landing page vs concept * fix links * Fix links * Fix desc
1.8 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | |||||
|---|---|---|---|---|---|---|---|---|---|
| Metafiles in GDI+ | 03/30/2017 |
|
|
51da872c-c783-440f-8bf6-1e580a966c31 |
Metafiles in GDI+
GDI+ provides the xref:System.Drawing.Imaging.Metafile class so that you can record and display metafiles. A metafile, also called a vector image, is an image that is stored as a sequence of drawing commands and settings. The commands and settings recorded in a xref:System.Drawing.Imaging.Metafile object can be stored in memory or saved to a file or stream.
Metafile Formats
GDI+ can display metafiles that have been stored in the following formats:
-
Windows Metafile (WMF)
-
Enhanced Metafile (EMF)
-
EMF+
GDI+ can record metafiles in the EMF and EMF+ formats, but not in the WMF format.
EMF+ is an extension to EMF that allows GDI+ records to be stored. There are two variations on the EMF+ format: EMF+ Only and EMF+ Dual. EMF+ Only metafiles contain only GDI+ records. Such metafiles can be displayed by GDI+ but not by GDI. EMF+ Dual metafiles contain GDI+ and GDI records. Each GDI+ record in an EMF+ Dual metafile is paired with an alternate GDI record. Such metafiles can be displayed by GDI+ or by GDI.
The following example displays a metafile that was previously saved as a file. The metafile is displayed with its upper-left corner at (100, 100).
[!code-csharpSystem.Drawing.ImagesBitmapsMetafiles#21] [!code-vbSystem.Drawing.ImagesBitmapsMetafiles#21]