applyTransform method

  1. @override
void applyTransform (Layer child, Matrix4 transform)
override

Applies the transform that would be applied when compositing the given child to the given matrix.

See ContainerLayer.applyTransform for details.

The child argument may be null, as the same transform is applied to all children.

Implementation

@override
void applyTransform(Layer child, Matrix4 transform) {
  assert(_lastOffset != null);
  if (_lastOffset != Offset.zero)
    transform.translate(_lastOffset.dx, _lastOffset.dy);
}