boundingBox method

  1. @override
PdfRect boundingBox()
override

Implementation

@override
PdfRect boundingBox() {
  var x = double.infinity, y = double.infinity, w = 0.0, h = 0.0;
  for (final child in children) {
    final b = child.boundingBox();
    x = min(b.x, x);
    y = min(b.y, y);
    w = max(b.width, w);
    h = max(b.height, w);
  }

  return PdfRect(x, y, w, h);
}