class PLRuby::Box - RDoc Documentation

# class PLRuby::Box

The class PLRuby::Box implement the PostgreSQL type box

### Public Class Methods

from_string(string) click to toggle source

Convert a String (PostgreSQL representation) to a Box object

    # File plruby.rb, line 1313
    def from_string(string)
    end

new(*args) click to toggle source

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

*(point) click to toggle source

scale and rotate self

    # File plruby.rb, line 1326
    def *(point)
    end

+(point) click to toggle source

translate (right, up) self

    # File plruby.rb, line 1318
    def +(point)
    end

-(point) click to toggle source

translate (left, down) self

    # File plruby.rb, line 1322
    def -(point)
    end

/(point) click to toggle source

scale and rotate self

    # File plruby.rb, line 1330
    def /(point)
    end

<=>(other) click to toggle source

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

===(other) click to toggle source

return true if the 2 boxes self and other are identical

    # File plruby.rb, line 1334
    def ===(other)
    end

above?(other) click to toggle source

return true if self is above other

    # File plruby.rb, line 1343
    def above?(other)
    end

area() click to toggle source

return the area of the Box

    # File plruby.rb, line 1347
    def area
    end

below?(other) click to toggle source

return true if self is below other

    # File plruby.rb, line 1351
    def below?(other)
    end

center() click to toggle source

return the center point of the Box

    # File plruby.rb, line 1355
    def center
    end

closest(other) click to toggle source

closest point to other

other can be a Point, or Segment

    # File plruby.rb, line 1361
    def closest(other)
    end

contain?(other) click to toggle source

return true if self contain other

    # File plruby.rb, line 1365
    def contain?(other)
    end

contained?(other) click to toggle source

return true if self is contained by other

    # File plruby.rb, line 1369
    def contained?(other)
    end

diagonal() click to toggle source

return a line Segment which happens to be the positive-slope diagonal of Box

    # File plruby.rb, line 1374
    def diagonal
    end

height() click to toggle source

return the height of the Box (vertical magnitude)

    # File plruby.rb, line 1378
    def height
    end

in?(other) click to toggle source

return true if self is contained by other

    # File plruby.rb, line 1382
    def in?(other)
    end

intersect?(segment) click to toggle source

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.

    # File plruby.rb, line 1404
    def intersect?(segment)
    end

intersection(other) click to toggle source

returns the overlapping portion of two boxes, or nil if they do not intersect.

    # File plruby.rb, line 1394
    def intersection(other)
    end

left?(other) click to toggle source

return true if self is strictly left of other

    # File plruby.rb, line 1408
    def left?(other)
    end

overlap?(other) click to toggle source

return true if self overlap other

    # File plruby.rb, line 1412
    def overlap?(other)
    end

overleft?(other) click to toggle source

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

overright?(other) click to toggle source

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

right?(other) click to toggle source

return true if self is strictly right of other

    # File plruby.rb, line 1426
    def right?(other)
    end

same?(other) click to toggle source

return true if the 2 boxes self and other are identical

    # File plruby.rb, line 1430
    def same?(other)
    end

to_circle() click to toggle source

convert a Box to a Circle

    # File plruby.rb, line 1434
    def to_circle
    end

to_point() click to toggle source

return the center Point of the Box

    # File plruby.rb, line 1438
    def to_point
    end

to_polygon() click to toggle source

convert a Box to a Polygon

    # File plruby.rb, line 1442
    def to_polygon
    end

to_segment() click to toggle source

return a line Segment which happens to be the positive-slope diagonal of Box

    # File plruby.rb, line 1447
    def to_segment
    end

width() click to toggle source

return the width of the Box (horizontal magnitude)

    # File plruby.rb, line 1451
    def width
    end