render abstract method
Renders a given text
in a given position position
using the provided
canvas
and anchor
.
For example, if Anchor.center is specified, it's going to be drawn
centered around position
.
Example usage (Using TextPaint implementation):
const TextStyle style = TextStyle(fontSize: 48.0, fontFamily: 'Arial'); const TextPaint textPaint = TextPaint(style: style); textPaint.render( canvas, Vector2(size.x - 10, size.y - 10, anchor: Anchor.bottomRight, );
Implementation
void render(
Canvas canvas,
String text,
Vector2 position, {
Anchor anchor = Anchor.topLeft,
});