RichTextLeaf¶
Overview¶
A leaf (text) element in the RichText, which will display a snippet of Text.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RichTextLeaf¶
Constructor¶
new RichTextLeaf( content : string, isLTR : boolean, font : Font | string, boundsMethod : TextBoundsMethod, fill : TPaint, stroke : TPaint, lineWidth : number )¶
Instance Methods¶
initialize( content : string, isLTR : boolean, font : Font | string, boundsMethod : TextBoundsMethod, fill : TPaint, stroke : TPaint, lineWidth : number ) : this¶
clean()¶
Cleans references that could cause memory leaks (as those things may contain other references).
fitsIn( widthAvailable : number, hasAddedLeafToLine : boolean, isContainerLTR : boolean ) : boolean¶
Whether this leaf will fit in the specified amount of space (including, if required, the amount of spacing on the side).
freeToPool()¶
Instance Properties¶
leftSpacing : number¶
rightSpacing : number¶
Static Properties¶
pool : Pool¶
(readonly)
Source Code¶
See the source for RichTextLeaf.ts in the scenery repository.