renderPoint method

void renderPoint(
  1. Vector2 point, {
  2. double size = 1.0,
  3. Paint? paint,
})

Renders a point as a square of size size (default 1 logical pixel) using the provided paint (default solid magenta).

This is mostly useful for debugging.

Implementation

void renderPoint(
  Vector2 point, {
  double size = 1.0,
  Paint? paint,
}) {
  final rect = (point - Vector2.all(size / 2)) & Vector2.all(size);
  drawRect(rect, paint ?? BasicPalette.magenta.paint());
}