SpriteFontRenderer class

SpriteFontRenderer will render text using a SpriteFont font, creating a SpriteFontTextElement.

Inheritance

Constructors

SpriteFontRenderer.fromFont(SpriteFont font, {double scale = 1.0, double letterSpacing = 0.0, Color? color})

Properties

font SpriteFont
final
hashCode int
The hash code for this object.
no setterinherited
letterSpacing double
final
paint Paint
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
final

Methods

format(String text) SpriteFontTextElement
override
getLineMetrics(String text) LineMetrics
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas, String text, Vector2 position, {Anchor anchor = Anchor.topLeft}) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited