Class TextPainter
Inheritance
System.Object
TextPainter
Syntax
Constructors
TextPainter(TextSpan, TextAlign, TextDirection, Single, Nullable<Int32>, String)
Declaration
public TextPainter(TextSpan text = null, TextAlign textAlign = TextAlign.left, TextDirection textDirection = TextDirection.ltr, float textScaleFactor = 1F, int? maxLines = default(int? ), string ellipsis = "")
Parameters
Type |
Name |
Description |
TextSpan |
text |
|
TextAlign |
textAlign |
|
TextDirection |
textDirection |
|
System.Single |
textScaleFactor |
|
System.Nullable<System.Int32> |
maxLines |
|
System.String |
ellipsis |
|
Properties
didExceedMaxLines
Declaration
public bool didExceedMaxLines { get; }
Property Value
Type |
Description |
System.Boolean |
|
ellipsis
Declaration
public string ellipsis { get; set; }
Property Value
Type |
Description |
System.String |
|
height
Declaration
public float height { get; }
Property Value
Type |
Description |
System.Single |
|
maxIntrinsicWidth
Declaration
public float maxIntrinsicWidth { get; }
Property Value
Type |
Description |
System.Single |
|
maxLines
Declaration
public int? maxLines { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
minIntrinsicWidth
Declaration
public float minIntrinsicWidth { get; }
Property Value
Type |
Description |
System.Single |
|
preferredLineHeight
Declaration
public float preferredLineHeight { get; }
Property Value
Type |
Description |
System.Single |
|
size
Declaration
public Size size { get; }
Property Value
text
Declaration
public TextSpan text { get; set; }
Property Value
textAlign
Declaration
public TextAlign textAlign { get; set; }
Property Value
textDirection
Declaration
public TextDirection? textDirection { get; set; }
Property Value
textScaleFactor
Declaration
public float textScaleFactor { get; set; }
Property Value
Type |
Description |
System.Single |
|
width
Declaration
public float width { get; }
Property Value
Type |
Description |
System.Single |
|
Methods
computeDistanceToActualBaseline(TextBaseline)
Declaration
public float computeDistanceToActualBaseline(TextBaseline baseline)
Parameters
Returns
Type |
Description |
System.Single |
|
getBoxesForSelection(TextSelection)
Declaration
public List<TextBox> getBoxesForSelection(TextSelection selection)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<TextBox> |
|
getLineCount()
Declaration
public int getLineCount()
Returns
Type |
Description |
System.Int32 |
|
getLineIndex(TextPosition)
Declaration
public int getLineIndex(TextPosition position)
Parameters
Returns
Type |
Description |
System.Int32 |
|
getLineRange(Int32)
Declaration
public Paragraph.LineRange getLineRange(int lineNumber)
Parameters
Type |
Name |
Description |
System.Int32 |
lineNumber |
|
Returns
getLineRange(TextPosition)
Declaration
public Paragraph.LineRange getLineRange(TextPosition textPosition)
Parameters
Returns
getOffsetForCaret(TextPosition, Rect)
Declaration
public Offset getOffsetForCaret(TextPosition position, Rect caretPrototype)
Parameters
Returns
getPositionForOffset(Offset)
Declaration
public TextPosition getPositionForOffset(Offset offset)
Parameters
Type |
Name |
Description |
Offset |
offset |
|
Returns
getPositionVerticalMove(TextPosition, Int32)
Declaration
public TextPosition getPositionVerticalMove(TextPosition position, int move)
Parameters
Type |
Name |
Description |
TextPosition |
position |
|
System.Int32 |
move |
|
Returns
getWordBoundary(TextPosition)
Declaration
public TextRange getWordBoundary(TextPosition position)
Parameters
Returns
getWordLeft(TextPosition)
Declaration
public TextPosition getWordLeft(TextPosition position)
Parameters
Returns
getWordRight(TextPosition)
Declaration
public TextPosition getWordRight(TextPosition position)
Parameters
Returns
layout(Single, Single)
Declaration
public void layout(float minWidth = 0F, float maxWidth = InfinityF)
Parameters
Type |
Name |
Description |
System.Single |
minWidth |
|
System.Single |
maxWidth |
|
paint(Canvas, Offset)
Declaration
public void paint(Canvas canvas, Offset offset)
Parameters