matrixRotate method
Return a new matrix representing the given matrix after applying the given rotation.
Implementation
@protected
Matrix4 matrixRotate(Matrix4 matrix, double rotation, Offset focalPoint) {
if (rotation == 0) {
return matrix.clone();
}
final Offset focalPointScene = transformationController!.toScene(
focalPoint,
);
return matrix.clone()
..translate(focalPointScene.dx, focalPointScene.dy)
..rotateZ(-rotation)
..translate(-focalPointScene.dx, -focalPointScene.dy);
}