Table of Contents

Class MetafileDecodeOptions

Namespace
Egami.Metafiles
Assembly
Egami.Metafiles.dll

How MetafileFormat draws a metafile for Raster.Load and sizes it for Raster.Probe.

public sealed record MetafileDecodeOptions : ReaderOptions, IEquatable<ReaderOptions>, IEquatable<MetafileDecodeOptions>
Inheritance
MetafileDecodeOptions
Implements
Inherited Members

Examples

// Register the format once; Raster.Load then draws metafiles at their own size at 96 DPI.
EgamiContext context = EgamiContext.Default.WithFormat(MetafileFormat.Info);
using Raster raster = Raster.Load(path, context);
RasterInfo info = Raster.Probe(path, context); // the size from the header, nothing drawn

// MetafileDecodeOptions sets the resolution; Raster.Load then draws at that DPI.
using Raster sharp = Raster.Load(path, context, new MetafileDecodeOptions { Dpi = 300 });

Properties

Dpi

Gets the resolution the picture's size is drawn at; 96 by default.

public float Dpi { get; init; }

Property Value

float

Exceptions

ArgumentOutOfRangeException

The value is not positive and finite.