Method: RIImage#initialize

Defined in:
lib/RIUI/RIImage.rb

#initialize(opts = {}) ⇒ RIImage

Returns a new instance of RIImage.



5
6
7
8
9
10
11
12
# File 'lib/RIUI/RIImage.rb', line 5

def initialize(opts={})
  @path = opts[:image] || "/"
  @x = opts[:x] || 0
  @y = opts[:y] || 0
  @width = opts[:width] || 0
  @height = opts[:height] || 0
  @image = Image.new(path: @path, x: @x, y: @y, width: @width, height: @height)
end