composeMatrixFromOffsets function

Matrix4 composeMatrixFromOffsets({
  1. double scale = 1,
  2. double rotation = 0,
  3. Offset translate = Offset.zero,
  4. Offset anchor = Offset.zero,
})

Helper function that uses Offset as translate and anchor. See composeMatrix for more info.

Implementation

Matrix4 composeMatrixFromOffsets({
  double scale = 1,
  double rotation = 0,
  Offset translate = Offset.zero,
  Offset anchor = Offset.zero,
}) =>
    composeMatrix(
      scale: scale,
      rotation: rotation,
      translateX: translate.dx,
      translateY: translate.dy,
      anchorX: anchor.dx,
      anchorY: anchor.dy,
    );