Skip to main content

DrawableTextRun Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

A text run that supports drawing content.

public class DrawableTextRun

Inheritance: object -> TextRun -> DrawableTextRun

Derived types:ShapedTextRun

Methods

NameDescription
DrawDraws the Avalonia.Media.TextFormatting.DrawableTextRun at the given origin.

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.

Properties

NameDescription
BaselineRun baseline in ratio relative to run height
SizeGets the size.
LengthGets the text source length. Inherited from TextRun.
PropertiesA set of properties shared by every characters in the run Inherited from TextRun.
TextGets the text run's text. Inherited from TextRun.

Baseline Property

Run baseline in ratio relative to run height

public double Baseline { get; set; }

Size Property

Gets the size.

public Avalonia.Size Size { get; set; }

Fields

NameDescription
DefaultTextSourceLengthInherited from TextRun.