strokeCircle method

  1. @override
void strokeCircle(
  1. num x,
  2. num y,
  3. num radius,
  4. PStyle style, {
  5. num startAngle = 0,
  6. num endAngle = 360,
})
override

Stroke a circle at (x,y) with radius.

Implementation

@override
void strokeCircle(num x, num y, num radius, PStyle style,
    {num startAngle = 0, num endAngle = 360}) {
  x = transform.x(x);
  y = transform.y(y);

  x = canvasX(x);
  y = canvasY(y);
  radius = canvasX(radius);

  startAngle = angleToRadians(startAngle);
  endAngle = angleToRadians(endAngle);

  _setFillStyle(style);

  _ctx.beginPath();
  _ctx.arc(x, y, radius, startAngle, endAngle);
  _ctx.stroke();
}