strokeCircle method
void
strokeCircle(})
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}) {
var xd = transform.xD(x);
var yd = transform.yD(y);
xd = canvasXD(xd);
yd = canvasYD(yd);
var radiusD2 = canvasXD(radius) * 2;
final rect = Rect.fromLTWH(xd, yd, radiusD2, radiusD2);
final paint = style.toPaintStroke(pixelRatio: pixelRatio);
_widgetPainter.addOp((canvas, size) {
canvas.drawArc(
rect, startAngle.toDouble(), endAngle.toDouble(), false, paint);
});
}