Spec-Zone.ru › Dart 2

dart:math

Метод boundingBox

Rectangle<T> boundingBox(
  1. Rectangle<T> other
)
inherited

Возвращает новый прямоугольник, который полностью содержит this и other.

Реализация

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 BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-math/Rectangle/boundingBox.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API