paint method
Paints this element on canvas
.
Implementation
void paint(Canvas canvas) {
if (rotation == null) {
draw(canvas);
} else {
canvas.save();
canvas.translate(rotationAxis!.dx, rotationAxis!.dy);
canvas.rotate(rotation!);
canvas.translate(-rotationAxis!.dx, -rotationAxis!.dy);
draw(canvas);
canvas.restore();
}
}