renderTree method
Implementation
@mustCallSuper
@override
void renderTree(Canvas canvas) {
final matrix = _transformMatrix;
if (matrix.m14 != body.position.x ||
matrix.m24 != body.position.y ||
_lastAngle != angle) {
matrix.setIdentity();
matrix.translate(body.position.x, body.position.y);
matrix.rotateZ(angle);
_lastAngle = angle;
}
canvas.save();
canvas.transform(matrix.storage);
super.renderTree(canvas);
canvas.restore();
}