draw method

void draw(
  1. Canvas c,
  2. Vector2 position,
  3. Vector2 size
)

Renders this nine box as a rectangle at position with size size.

Implementation

void draw(Canvas c, Vector2 position, Vector2 size) {
  c.drawImageNine(
    sprite.image,
    center,
    Rect.fromLTWH(position.x, position.y, size.x, size.y),
    _whitePaint,
  );
}