class PLRuby::Box
The class PLRuby::Box implement the PostgreSQL type box
Public Class Methods
Convert a String (PostgreSQL representation) to a Box object
# File plruby.rb, line 1313 def from_string(string) end
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)
# File plruby.rb, line 1389 def initialize(*args) end
Public Instance Methods
scale and rotate self
# File plruby.rb, line 1326 def *(point) end
translate (right, up) self
# File plruby.rb, line 1318 def +(point) end
translate (left, down) self
# File plruby.rb, line 1322 def -(point) end
scale and rotate self
# File plruby.rb, line 1330 def /(point) end
comparison operator for 2 Box based on the area of the 2 objects, i.e. self.area <=> box.area
# File plruby.rb, line 1339 def <=>(other) end
return true if the 2 boxes self and other are identical
# File plruby.rb, line 1334 def ===(other) end
return true if self is above other
# File plruby.rb, line 1343 def above?(other) end
return the area of the Box
# File plruby.rb, line 1347 def area end
return true if self is below other
# File plruby.rb, line 1351 def below?(other) end
return the center point of the Box
# File plruby.rb, line 1355 def center end
closest point to other
other can be a Point, or Segment
# File plruby.rb, line 1361 def closest(other) end
return true if self contain other
# File plruby.rb, line 1365 def contain?(other) end
return true if self is contained by other
# File plruby.rb, line 1369 def contained?(other) end
return a line Segment which happens to be the positive-slope diagonal of Box
# File plruby.rb, line 1374 def diagonal end
return the height of the Box (vertical magnitude)
# File plruby.rb, line 1378 def height end
return true if self is contained by other
# File plruby.rb, line 1382 def in?(other) end
returns the overlapping portion of two boxes, or nil if they do not intersect.
# File plruby.rb, line 1394 def intersection(other) end
return true if self is strictly left of other
# File plruby.rb, line 1408 def left?(other) end
return true if self overlap other
# File plruby.rb, line 1412 def overlap?(other) end
return true if the right edge of self is to the left of the right edge of other
# File plruby.rb, line 1417 def overleft?(other) end
return true if the left edge of self is to the right of the left edge of other
# File plruby.rb, line 1422 def overright?(other) end
return true if self is strictly right of other
# File plruby.rb, line 1426 def right?(other) end
return true if the 2 boxes self and other are identical
# File plruby.rb, line 1430 def same?(other) end
convert a Box to a Circle
# File plruby.rb, line 1434 def to_circle end
return the center Point of the Box
# File plruby.rb, line 1438 def to_point end
convert a Box to a Polygon
# File plruby.rb, line 1442 def to_polygon end
return a line Segment which happens to be the positive-slope diagonal of Box
# File plruby.rb, line 1447 def to_segment end
return the width of the Box (horizontal magnitude)
# File plruby.rb, line 1451 def width end