calculateBounds method
Rect
calculateBounds(
{ - bool approximate = true,
})
Implementation
Rect calculateBounds({bool approximate = true}) {
double minX = .maxFinite;
double minY = .maxFinite;
double maxX = .minPositive;
double maxY = .minPositive;
for (var i = 0; i < cubics.length; i++) {
final cubic = cubics[i];
final bounds = cubic.calculateBounds(approximate: approximate);
minX = math.min(minX, bounds.left);
minY = math.min(minY, bounds.top);
maxX = math.max(maxX, bounds.right);
maxY = math.max(maxY, bounds.bottom);
}
return Rect.fromLTRB(minX, minY, maxX, maxY);
}