Skip to main content

WordSegment Struct

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Represents a segment between two Unicode word boundaries.

public struct WordSegment

Inheritance: ValueType -> WordSegment

Constructors​

NameDescription
WordSegmentInitializes a new instance of the Avalonia.Media.TextFormatting.Unicode.WordSegment struct.

WordSegment Constructor​

Initializes a new instance of the Avalonia.Media.TextFormatting.Unicode.WordSegment struct.

public WordSegment(int offset, int length, int codepointOffset, int codepointLength)

Parameters​

offset int

The segment offset in UTF-16 code units.

length int

The segment length in UTF-16 code units.

codepointOffset int

The segment offset in Unicode code points.

codepointLength int

The segment length in Unicode code points.

Properties​

NameDescription
CodepointLengthGets the segment length in Unicode code points.
CodepointOffsetGets the segment offset in Unicode code points.
LengthGets the segment length in UTF-16 code units.
OffsetGets the segment offset in UTF-16 code units.

CodepointLength Property​

Gets the segment length in Unicode code points.

public int CodepointLength { get; set; }

CodepointOffset Property​

Gets the segment offset in Unicode code points.

public int CodepointOffset { get; set; }

Length Property​

Gets the segment length in UTF-16 code units.

public int Length { get; set; }

Offset Property​

Gets the segment offset in UTF-16 code units.

public int Offset { get; set; }