applyTransformation method
Implementation
void applyTransformation(
CanvasTransformation transformation,
Size canvasSize,
) {
if (transformation.scale != null) {
scale(transformation.scale!.x.toDouble(),
transformation.scale!.y.toDouble());
}
if (transformation.translate != null) {
translate(
transformation.translate!.x.toDouble() * canvasSize.width,
transformation.translate!.y.toDouble() * canvasSize.height,
);
}
}