of static method

FlatBounds? of(
  1. List<FlatSubpath> subpaths
)

Implementation

static FlatBounds? of(List<FlatSubpath> subpaths) {
  FlatBounds? b;
  for (final sub in subpaths) {
    final p = sub.points;
    for (var i = 0; i < p.length; i += 2) {
      if (b == null) {
        b = FlatBounds(p[i], p[i + 1], p[i], p[i + 1]);
      } else {
        b.include(p[i], p[i + 1]);
      }
    }
  }
  return b;
}