Class MetafileWriter
Writes metafile documents to streams or files in WMF, EMF, or EMF+ format.
Inherited Members
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 |
| 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. |