expandToInclude method

GRect expandToInclude(
  1. GRect other
)

Similar to GRect.union, adds other to this object to create a new GRect object, by filling in the horizontal and vertical space between the two rectangles.

Implementation

GRect expandToInclude(GRect other) {
  var r = right;
  var b = bottom;
  x = math.min(left, other.left);
  y = math.min(top, other.top);
  right = math.max(r, other.right);
  bottom = math.max(b, other.bottom);
  return this;
}