Table of Contents

Struct GlyphRunSourceSegment

Namespace
DocWright.Core.Rendering
Assembly
DocWright.Core.dll

One piece of a run's text and the document text it came from.

public readonly struct GlyphRunSourceSegment : IEquatable<GlyphRunSourceSegment>
Implements
Inherited Members

Remarks

The run's characters [TextOffset, TextOffset + TextLength) were laid out from the node's characters [Start, Start + Length). The two lengths are equal except where layout drew a character the document does not hold, such as the hyphen at a hyphenated break: that character has a segment of its own with a Length of zero at the point it stands for.

Constructors

GlyphRunSourceSegment(long, int, int, int, int)

Initializes a segment.

Properties

Length

Gets how many of the node's characters (UTF-16 code units).

NodeKey

Gets the key of the document node the text came from: the value of its DomNodeId, which DomNodeId.FromValue and WordDocument.FindNode turn back into the node.

Start

Gets the first character in the node's text (UTF-16 code units).

TextLength

Gets how many of the run's characters.

TextOffset

Gets the first character in the run's Text.

Methods

Equals(GlyphRunSourceSegment)
Equals(object?)
GetHashCode()