class Rect

a primitive class that incapsulate a rectangle on screen, with position (top, left) and size (width, height)

Attributes

height[R]
left[R]
top[R]
width[R]

Public Class Methods

new(opts = {}) click to toggle source

create a rectangle with top, left, width and height

opts(Hash)

a hash with keys (top, left, width, height)

# File lib/amun/primitives/rect.rb, line 9
def initialize(opts = {})
  @top = opts[:top]
  @left = opts[:left]
  @width = opts[:width]
  @height = opts[:height]
end