setUvTransform method

Matrix3 setUvTransform(
  1. num tx,
  2. num ty,
  3. num sx,
  4. num sy,
  5. num rotation,
  6. num cx,
  7. num cy,
)

Implementation

Matrix3 setUvTransform(num tx, num ty, num sx, num sy, num rotation, num cx, num cy) {
  final c = Math.cos(rotation);
  final s = Math.sin(rotation);

  set(sx * c, sx * s, -sx * (c * cx + s * cy) + cx + tx, -sy * s, sy * c, -sy * (-s * cx + c * cy) + cy + ty, 0, 0,
      1);

  return this;
}