transform method

void transform(
  1. double a,
  2. double b,
  3. double c,
  4. double d,
  5. double e,
  6. double f,
)

Implementation

void transform(double a, double b, double c, double d, double e, double f) {
  // Matrix3
  // [ a c e
  //   b d f
  //   0 0 1 ]
  //
  // Matrix4
  // [ a, b, 0, 0,
  //   c, d, 0, 0,
  //   e, f, 1, 0,
  //   0, 0, 0, 1 ]
  final Float64List m4storage = Float64List(16);
  m4storage[0] = a;
  m4storage[1] = b;
  m4storage[2] = 0.0;
  m4storage[3] = 0.0;
  m4storage[4] = c;
  m4storage[5] = d;
  m4storage[6] = 0.0;
  m4storage[7] = 0.0;
  m4storage[8] = e;
  m4storage[9] = f;
  m4storage[10] = 1.0;
  m4storage[11] = 0.0;
  m4storage[12] = 0.0;
  m4storage[13] = 0.0;
  m4storage[14] = 0.0;
  m4storage[15] = 1.0;

  _matrix = Matrix4.fromFloat64List(m4storage)..multiply(_matrix);
  addAction((Canvas canvas, Size size) {
    canvas.transform(m4storage);
  });
}