Skip to main content

ShapedTextRun Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

A text run that holds shaped characters.

public class ShapedTextRun

Inheritance: object -> TextRun -> DrawableTextRun -> ShapedTextRun

Implements: IDisposable

Constructors

NameDescription
ShapedTextRunNo summary available.

ShapedTextRun Constructor

public ShapedTextRun(Avalonia.Media.TextFormatting.ShapedBuffer shapedBuffer, Avalonia.Media.TextFormatting.TextRunProperties properties)

Parameters

shapedBuffer Avalonia.Media.TextFormatting.ShapedBuffer

properties Avalonia.Media.TextFormatting.TextRunProperties

Methods

NameDescription
DisposeNo summary available.
DrawDraws the Avalonia.Media.TextFormatting.DrawableTextRun at the given origin.
TryMeasureCharactersNo summary available.

Dispose Method

public void Dispose()

Draw Method

Draws the Avalonia.Media.TextFormatting.DrawableTextRun at the given origin.

public void Draw(Avalonia.Media.DrawingContext drawingContext, Avalonia.Point origin)

Parameters

drawingContext Avalonia.Media.DrawingContext

The drawing context.

origin Avalonia.Point

The origin.

TryMeasureCharacters Method

public bool TryMeasureCharacters(double availableWidth, int& length)

Parameters

availableWidth double

length int&

Returns

bool

Properties

NameDescription
BaselineNo summary available.
BidiLevelNo summary available.
GlyphRunNo summary available.
IsReversedNo summary available.
LengthGets the text source length.
PropertiesA set of properties shared by every characters in the run
ShapedBufferNo summary available.
SizeNo summary available.
TextGets the text run's text.
TextMetricsNo summary available.

Baseline Property

public double Baseline { get; set; }

BidiLevel Property

public sbyte BidiLevel { get; set; }

GlyphRun Property

public Avalonia.Media.GlyphRun GlyphRun { get; set; }

IsReversed Property

public bool IsReversed { get; set; }

Length Property

Gets the text source length.

public int Length { get; set; }

Properties Property

A set of properties shared by every characters in the run

public Avalonia.Media.TextFormatting.TextRunProperties Properties { get; set; }

ShapedBuffer Property

public Avalonia.Media.TextFormatting.ShapedBuffer ShapedBuffer { get; set; }

Size Property

public Avalonia.Size Size { get; set; }

Text Property

Gets the text run's text.

public ReadOnlyMemory<char> Text { get; set; }

TextMetrics Property

public Avalonia.Media.TextFormatting.TextMetrics TextMetrics { get; set; }

Fields

NameDescription
DefaultTextSourceLengthInherited from TextRun.