applyTransformIfNeeded method

Path? applyTransformIfNeeded(
  1. Path? path
)

Applies a transform to a path if the attributes contain a transform.

Implementation

Path? applyTransformIfNeeded(Path? path) {
  final Matrix4? transform =
      parseTransform(getAttribute(attributes, 'transform', def: null));

  if (transform != null) {
    return path!.transform(transform.storage);
  } else {
    return path;
  }
}