getLastTransform method

Matrix4 getLastTransform ()

The transform that was used during the last composition phase.

If the link was not linked to a LeaderLayer, or if this layer has a degenerate matrix applied, then this will be null.

This method returns a new Matrix4 instance each time it is invoked.

Implementation

Matrix4 getLastTransform() {
  if (_lastTransform == null)
    return null;
  final Matrix4 result = Matrix4.translationValues(-_lastOffset.dx, -_lastOffset.dy, 0.0);
  result.multiply(_lastTransform);
  return result;
}