renderReticle method

void renderReticle(
  1. Canvas canvas,
  2. Size viewportSize
)

Renders the reticle (crosshair) at screen center.

Implementation

void renderReticle(Canvas canvas, Size viewportSize) {
  final center = Offset(viewportSize.width / 2, viewportSize.height / 2);
  const baseRadius = 4.0;
  final dwellRadius = baseRadius + dwellProgress * 8;

  // Outer ring (dwell progress)
  if (dwellProgress > 0) {
    canvas.drawArc(
      Rect.fromCircle(center: center, radius: dwellRadius),
      -1.5708, // Start at top
      dwellProgress * 6.2832, // Full circle
      false,
      Paint()
        ..color = const Color(0xFFFFFFFF)
        ..style = PaintingStyle.stroke
        ..strokeWidth = 2,
    );
  }

  // Center dot
  canvas.drawCircle(
    center,
    _gazeTargetId != null ? 3 : 2,
    Paint()..color = const Color(0xCCFFFFFF),
  );
}