shapeBoundingBox property

  1. @override
PRectangle get shapeBoundingBox
override

Implementation

@override
PRectangle get shapeBoundingBox {
  var x1 = math.min(this.x1, this.x2);
  var x2 = math.max(this.x1, this.x2);

  var y1 = math.min(this.y1, this.y2);
  var y2 = math.max(this.y1, this.y2);

  var w = x2 - x1;
  var h = y2 - y1;

  return PRectangle(x1, y1, w, h);
}