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
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
Returns
HitTest(string, TextStyle, float)
Index of the caret position closest to x (single line).
public int HitTest(string text, TextStyle style, float x)
Parameters
Returns
Measure(string, TextStyle, float)
Size of the laid-out text in DIPs.
public Size Measure(string text, TextStyle style, float maxWidth = Infinity)