boundingBox method
-
Rectangle<
T> other
inherited
Returns a new rectangle which completely contains this
and other
.
Implementation
Rectangle<T> boundingBox(Rectangle<T> other) { var right = max(this.left + this.width, other.left + other.width); var bottom = max(this.top + this.height, other.top + other.height); var left = min(this.left, other.left); var top = min(this.top, other.top); return Rectangle<T>(left, top, (right - left) as T, (bottom - top) as T); }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-math/Rectangle/boundingBox.html