module Dieses::Geometry::Rect::Align

Public Instance Methods

bottom(this, that) click to toggle source
# File lib/dieses/geometry/rect.rb, line 60
def bottom(this, that)
  Point.new(that.position.x, this.position.y)
end
center(this, that) click to toggle source
# File lib/dieses/geometry/rect.rb, line 43
def center(this, that)
  Point.new(this.position.x + (this.width  - that.width)  / 2,
            this.position.y + (this.height - that.height) / 2)
end
left(this, that) click to toggle source
# File lib/dieses/geometry/rect.rb, line 48
def left(this, that)
  Point.new(this.position.x, that.position.y)
end
right(this, that) click to toggle source
# File lib/dieses/geometry/rect.rb, line 52
def right(this, that)
  Point.new(this.position.x + (this.width - that.width), that.position.y)
end
top(this, that) click to toggle source
# File lib/dieses/geometry/rect.rb, line 56
def top(this, that)
  Point.new(that.position.x, this.position.y + (this.height - that.height))
end