• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class Metafile

Represents a Windows metafile (.wmf or .emf), which is a vector image format containing a sequence of drawing commands.

Inheritance
object
Image
Metafile
Implements
IDisposable
Inherited Members
Image.Size
Image.PhysicalDimension
Image.HorizontalResolution
Image.VerticalResolution
Image.GetBounds(ref GraphicsUnit)
Image.GetFrameCount(FrameDimension)
Image.SelectActiveFrame(FrameDimension, int)
Image.GetPropertyItem(int)
Image.GetPropertyIdList()
Image.PropertyItems
Image.GetEncoderParameterList(Guid)
Image.Save(Stream, ImageFormat, EncoderParameters)
Image.GetThumbnailImage(int, int, GetThumbnailImageAbort, IntPtr)
Image.FromFile(string)
Image.FromStream(Stream)
Image.Dispose()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DRIT.Drawing.Imaging
Assembly: DRIT.Drawing.dll
Syntax
public sealed class Metafile : Image, IDisposable
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Constructors

Metafile(Stream)

Initializes a new Metafile from the specified stream.

Declaration
public Metafile(Stream stream)
Parameters
Type Name Description
Stream stream

The stream to load from.

Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Metafile(string)

Initializes a new Metafile from the specified file.

Declaration
public Metafile(string filename)
Parameters
Type Name Description
string filename

The file to load from.

Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Properties

Flags

Gets the flags for this metafile.

Declaration
public override int Flags { get; }
Property Value
Type Description
int
Overrides
Image.Flags
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Height

Gets the height of this metafile in pixels.

Declaration
public override int Height { get; }
Property Value
Type Description
int
Overrides
Image.Height
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

PixelFormat

Gets the pixel format of this metafile.

Declaration
public override PixelFormat PixelFormat { get; }
Property Value
Type Description
PixelFormat
Overrides
Image.PixelFormat
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

RawFormat

Gets the format of this metafile.

Declaration
public override ImageFormat RawFormat { get; }
Property Value
Type Description
ImageFormat
Overrides
Image.RawFormat
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Width

Gets the width of this metafile in pixels.

Declaration
public override int Width { get; }
Property Value
Type Description
int
Overrides
Image.Width
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Methods

Clone()

Creates an exact copy of this Metafile.

Declaration
public override Image Clone()
Returns
Type Description
Image

A new Metafile with the same content.

Overrides
Image.Clone()
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

GetMetafileHeader()

Gets the metafile header information.

Declaration
public MetafileHeader GetMetafileHeader()
Returns
Type Description
MetafileHeader

The metafile header.

Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

RotateFlip(RotateFlipType)

Rotates and flips the metafile.

Declaration
public override void RotateFlip(RotateFlipType rotateFlipType)
Parameters
Type Name Description
RotateFlipType rotateFlipType

The rotation and flip type.

Overrides
Image.RotateFlip(RotateFlipType)
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Exceptions
Type Condition
NotSupportedException

This operation is not supported for vector metafiles.

Save(Stream, ImageFormat)

Saves this metafile to the specified stream in the specified format.

Declaration
public override void Save(Stream stream, ImageFormat format)
Parameters
Type Name Description
Stream stream

The stream to save to.

ImageFormat format

The format to save in.

Overrides
Image.Save(Stream, ImageFormat)
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Save(string)

Saves this metafile to the specified file.

Declaration
public override void Save(string filename)
Parameters
Type Name Description
string filename

The file name to save to.

Overrides
Image.Save(string)
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Save(string, ImageFormat)

Saves this metafile to the specified file in the specified format.

Declaration
public override void Save(string filename, ImageFormat format)
Parameters
Type Name Description
string filename

The file name to save to.

ImageFormat format

The format to save in.

Overrides
Image.Save(string, ImageFormat)
Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

ToBitmap()

Renders this metafile to a Bitmap.

Declaration
public Bitmap ToBitmap()
Returns
Type Description
Bitmap

The rendered bitmap.

Remarks

A Metafile can be loaded from WMF or EMF files and rendered to a Bitmap using ToBitmap(). Metafiles are commonly used for scalable graphics that maintain quality at any resolution.

Implements

IDisposable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX