Table of Contents

Class SoftwareTextMeasureContext

Namespace
Xui.Runtime.Software.Actual
Assembly
Xui.Runtime.Software.dll

A lightweight ITextMeasureContext backed by the software font Catalog. Used to provide text hit-testing for pointer events without needing a full drawing context.

public sealed class SoftwareTextMeasureContext : ITextMeasureContext
Inheritance
SoftwareTextMeasureContext
Implements
Inherited Members

Constructors

SoftwareTextMeasureContext(Catalog)

public SoftwareTextMeasureContext(Catalog catalog)

Parameters

catalog Catalog

Methods

MeasureText(string)

Measures the layout and bounding box metrics of the specified text string using the current font.

public TextMetrics MeasureText(string text)

Parameters

text string

The text string to measure.

Returns

TextMetrics

A TextMetrics structure containing both string-specific and font-wide metrics.

SetFont(Font)

Sets the font used for all subsequent text drawing and measurement operations.

public void SetFont(Font font)

Parameters

font Font

The font definition to apply.