draw method
Implementation
void draw(Canvas canvas) {
switch (behaviour.shape) {
case ShapeType.FilledCircle:
drawCircles(canvas, [this.size / 2]);
break;
case ShapeType.StrokeCircle:
drawCircles(canvas, [this.size / 2]);
break;
case ShapeType.DoubleStrokeCircle:
drawCircles(canvas, [this.size / 2, this.size / 4]);
break;
case ShapeType.TripleStrokeCircle:
drawCircles(canvas, [this.size / 2, this.size / 3, this.size / 6]);
break;
case ShapeType.FilledSquare:
drawSquares(canvas, [this.size / 2]);
break;
case ShapeType.StrokeSquare:
drawSquares(canvas, [this.size / 2]);
break;
case ShapeType.DoubleStrokeSquare:
drawSquares(canvas, [this.size / 2, this.size / 4]);
break;
case ShapeType.TripleStrokeSquare:
drawSquares(canvas, [this.size / 2, this.size / 3, this.size / 6]);
break;
case ShapeType.Icon:
drawIcon(canvas);
break;
case ShapeType.Image:
drawImage(canvas);
break;
}
}