draw method
绘制核心方法
deeper
当前是否为底层绘制- 出于性能考虑
- 绘制过程为表层绘制,绘制完成抬起手指时会进行底层绘制
Implementation
@override
void draw(Canvas canvas, Size size, bool deeper) {
if (isEllipse) {
canvas.drawOval(Rect.fromPoints(startPoint, endPoint), paint);
} else {
canvas.drawCircle(startFromCenter ? startPoint : center, radius, paint);
}
}