computeWorldBounds method

AABB computeWorldBounds()

Implementation

AABB computeWorldBounds() {
  var boundsPaths = paths.where((path) => path.hasBounds);
  if (boundsPaths.isEmpty) {
    return AABB.fromMinMax(worldTranslation, worldTranslation);
  }
  var path = boundsPaths.first;
  AABB worldBounds = path.preciseComputeBounds(transform: path.pathTransform);
  for (final path in boundsPaths.skip(1)) {
    AABB.combine(worldBounds, worldBounds,
        path.preciseComputeBounds(transform: path.pathTransform));
  }
  return worldBounds;
}