The class PLRuby::Box implement the PostgreSQL type box
Convert a String (PostgreSQL representation) to a Box object
create a new Box object
args can be 2 Point objects (low, high) or 4 Float objects (low.x, low.y, high.x, high.y)
scale and rotate self
translate (right, up) self
translate (left, down) self
comparison operator for 2 Box based on the area of the 2 objects, i.e. self.area <=> box.area
return true if the 2 boxes self and other are identical
return true if self is above other
return the area of the Box
return true if self is below other
return the center point of the Box
closest point to other
other can be a Point, or Segment
return true if self contain other
return true if self is contained by other
return a line Segment which happens to be the positive-slope diagonal of Box
return the height of the Box (vertical magnitude)
returns true if the Segment segment intersect with the Box
Segment completely inside box counts as intersection. If you want only segments crossing box boundaries, try converting Box to Path first.
returns the overlapping portion of two boxes, or nil if they do not intersect.
return true if self is strictly left of other
return true if self overlap other
return true if the right edge of self is to the left of the right edge of other
return true if the left edge of self is to the right of the left edge of other
return true if self is strictly right of other
convert a Box to a Circle
return the center Point of the Box
convert a Box to a Polygon
return the width of the Box (horizontal magnitude)
[Validate]