Table of Contents

Class MetafileTextCommand

Namespace
DocWright.Core.Metafiles
Assembly
DocWright.Core.dll

A run of text positioned by the metafile's own advances.

public sealed class MetafileTextCommand : MetafileCommand
Inheritance
MetafileTextCommand
Inherited Members

Remarks

Advances is the crux of this type. A metafile records the advance of every character alongside the string, so playback does not shape text and does not measure it: doing either would make the rendered result depend on which shaper and which font substitution the host happens to have, which is exactly the non-determinism the library forbids. When the recorder omitted the array, Advances is empty and the consumer must measure — that is the only case where it may.

Constructors

MetafileTextCommand(string, MetafilePoint, IReadOnlyList<int>, MetafileFont, ColorRgb, MetafileTextAlignment, ColorRgb?)

Initializes a text command.

Properties

Advances

Gets the per-character advances in device units, or an empty list when the metafile recorded none and the consumer must measure.

Alignment

Gets the alignment the reference point is measured against.

BackgroundColor

Gets the background colour painted behind the run, or null when the background mode was transparent.

Color

Gets the text colour.

Font

Gets the font the metafile selected.

Origin

Gets the reference point in device units.

Text

Gets the characters to draw.