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

Class MetafileWriter

Writes metafile documents to streams or files in WMF, EMF, or EMF+ format.

Inheritance
object
MetafileWriter
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DRIT.Drawing.Metafile
Assembly: DRIT.Drawing.dll
Syntax
public class MetafileWriter

Constructors

MetafileWriter()

Initializes a empty MetafileWriter instance.

Declaration
public MetafileWriter()

Methods

Write(MetafileDocument, Stream)

Writes the specified metafile document to the specified stream.

Declaration
public void Write(MetafileDocument document, Stream stream)
Parameters
Type Name Description
MetafileDocument document

The metafile document to write.

Stream stream

The stream to write to.

Exceptions
Type Condition
ArgumentNullException

Thrown when document or stream is null.

InvalidOperationException

Thrown when the stream does not support writing.

InvalidDataException

Thrown when the metafile format is unsupported.

Write(MetafileDocument, string)

Writes the specified metafile document to the specified file path.

Declaration
public void Write(MetafileDocument document, string filePath)
Parameters
Type Name Description
MetafileDocument document

The metafile document to write.

string filePath

The path to write the metafile to.

WriteToBytes(MetafileDocument)

Writes the specified metafile document to a byte array.

Declaration
public byte[] WriteToBytes(MetafileDocument document)
Parameters
Type Name Description
MetafileDocument document

The metafile document to write.

Returns
Type Description
byte[]

A byte array containing the metafile data.

Back to top

DR-IT Software documentation

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

Generated by DocFX