Table of Contents

Interface ITextDrawingContext

Namespace
Xui.Core.Canvas
Assembly
Core.dll

Defines methods for drawing text onto the canvas, including alignment and baseline options. Mirrors the HTML5 Canvas 2D text API for fillText(). Also provides access to text measurement via ITextMeasureContext.

public interface ITextDrawingContext : ITextMeasureContext
Inherited Members

Properties

TextAlign

Sets the horizontal alignment of the text relative to the given position.

TextAlign TextAlign { set; }

Property Value

TextAlign

TextBaseline

Sets the vertical alignment of the text relative to the given baseline.

TextBaseline TextBaseline { set; }

Property Value

TextBaseline

Methods

FillText(string, Point)

Draws filled text at the specified position using the current fill style and font settings.

void FillText(string text, Point pos)

Parameters

text string

The text string to render.

pos Point

The position at which to start rendering the text.