applyTransform method
Applies the transform properties to the clipping path.
Implementation
Path applyTransform(Path path) {
var hasTransform = x != 0 ||
y != 0 ||
scaleX != 1 ||
scaleY != 1 ||
skewX != 1 ||
skewY != 1 ||
pivotX != 1 ||
pivotY != 1;
if (!hasTransform) {
return path;
}
final m = Pool.getMatrix();
m.setTransform(
x, y, pivotX, pivotY, scaleX, scaleY, skewX, skewY, rotation);
final result = path.transform(m.toNative().storage);
Pool.putMatrix(m);
return result;
}