MetafileExtensionsSaveAsEmf(Metafile, String) Method

Saves the specified metafile to the specified file as an EMF (Enhanced Metafile) using Windows API.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 8.1.0
C#
public static void SaveAsEmf(
	this Metafile metafile,
	string fileName
)

Parameters

metafile  Metafile
The Metafile instance to save. It must have Emf raw format.
fileName  String
The name of the file to which to save the metafile. The directory of the specified path is created if it does not exist.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Metafile. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

  Note

This method is supported on Windows only.

Exceptions

ArgumentNullExceptionmetafile or fileName is .
ArgumentExceptionThe RawFormat of the specified metafile is not the Emf format.
PlatformNotSupportedExceptionThis method is supported on Windows only.

See Also