DebugTextRenderer class

Text formatter suitable for use in golden tests. This formatter renders words as rectangles.

Rendering regular text in golden tests is unreliable due to differences in font definitions across platforms and different algorithms used for anti- aliasing.

Constructors

DebugTextRenderer({Color color = const Color(0xFFFFFFFF), double fontSize = 16.0, double lineHeight = 1.2, FontWeight fontWeight = FontWeight.normal, FontStyle fontStyle = FontStyle.normal})

Properties

color Color
final
fontSize double
final
fontStyle FontStyle
final
fontWeight FontWeight
final
hashCode int
The hash code for this object.
no setterinherited
lineHeight double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(String text) → InlineTextElement
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