ShapingRun Struct

A part of a line of text that is shaped at once: one script and one bidirectional level, as given by TextShaper.SplitRuns.

public readonly struct ShapingRun : IEquatable<ShapingRun>
Implements

Constructors

NameDescription
ShapingRun(int, int, UnicodeScript, byte)A part of a line of text that is shaped at once: one script and one bidirectional level, as given by TextShaper.SplitRuns.

ShapingRun(int, int, UnicodeScript, byte)

A part of a line of text that is shaped at once: one script and one bidirectional level, as given by TextShaper.SplitRuns.

public ShapingRun(int Index, int Length, UnicodeScript Script, byte BidiLevel)

Parameters

Index int
The index of the first UTF-16 code unit of the run in the line.
Length int
The number of UTF-16 code units of the run.
Script UnicodeScript
The script of the run.
BidiLevel byte
The embedding level of the run, from the Unicode Bidirectional Algorithm: odd for a right-to-left run.

Properties

NameDescription
BidiLevelThe embedding level of the run, from the Unicode Bidirectional Algorithm: odd for a right-to-left run.
IndexThe index of the first UTF-16 code unit of the run in the line.
IsRightToLeftGets a value indicating whether the run is right to left: its level is odd.
LengthThe number of UTF-16 code units of the run.
ScriptThe script of the run.

BidiLevel

ShapingRun.cs

The embedding level of the run, from the Unicode Bidirectional Algorithm: odd for a right-to-left run.

public byte BidiLevel { get; init; }

Property value

byte

The index of the first UTF-16 code unit of the run in the line.

public int Index { get; init; }

Property value

int

IsRightToLeft

ShapingRun.cs

Gets a value indicating whether the run is right to left: its level is odd.

public bool IsRightToLeft { get; }

Property value

bool

The number of UTF-16 code units of the run.

public int Length { get; init; }

Property value

int

The script of the run.

public UnicodeScript Script { get; init; }

Property value

UnicodeScript

Methods

NameDescription
Deconstruct(int, int, UnicodeScript, byte)
Equals(ShapingRun)
Equals(object)
GetHashCode()
ToString()

Deconstruct(int, int, UnicodeScript, byte)

public void Deconstruct(out int Index, out int Length, out UnicodeScript Script, out byte BidiLevel)

Parameters

Index int
Length int
Script UnicodeScript
BidiLevel byte

No documentation is available.

Equals overloads

Equals(ShapingRun)

public bool Equals(ShapingRun other)
Parameters
other ShapingRun
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(ShapingRun, ShapingRun)
operator !=(ShapingRun, ShapingRun)

operator ==(ShapingRun, ShapingRun)

public static bool operator ==(ShapingRun left, ShapingRun right)

Parameters

left ShapingRun
right ShapingRun

Returns

bool

No documentation is available.

operator !=(ShapingRun, ShapingRun)

public static bool operator !=(ShapingRun left, ShapingRun right)

Parameters

left ShapingRun
right ShapingRun

Returns

bool

No documentation is available.