Table of Contents

Class FallbackTextMeasurer

Namespace
PluginUI
Assembly
PluginUI.dll

Approximate measurer used when no renderer is available (unit tests, layout before attachment).

public sealed class FallbackTextMeasurer : ITextMeasurer
Inheritance
FallbackTextMeasurer
Implements
Inherited Members

Properties

Instance

Shared instance.

public static FallbackTextMeasurer Instance { get; }

Property Value

FallbackTextMeasurer

Methods

CaretX(string, TextStyle, int)

Horizontal position of the caret placed before character index (single line).

public float CaretX(string text, TextStyle style, int index)

Parameters

text string
style TextStyle
index int

Returns

float

HitTest(string, TextStyle, float)

Index of the caret position closest to x (single line).

public int HitTest(string text, TextStyle style, float x)

Parameters

text string
style TextStyle
x float

Returns

int

Measure(string, TextStyle, float)

Size of the laid-out text in DIPs.

public Size Measure(string text, TextStyle style, float maxWidth = Infinity)

Parameters

text string
style TextStyle
maxWidth float

Returns

Size