moveAndScale static method

Path moveAndScale(
  1. dynamic path,
  2. dynamic posX,
  3. dynamic posY,
  4. dynamic scaleX,
  5. dynamic scaleY,
)

Translate and scale a path to desired location and size

Implementation

static Path moveAndScale(path, posX, posY, scaleX, scaleY) {
  var transformMatrix = Matrix4.identity();
  transformMatrix.translate(posX, posY);
  transformMatrix.scale(scaleX, -scaleY);
  return path.transform(transformMatrix.storage);
}