Class: Rays::Bitmap

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rays/bitmap.rb

Instance Method Summary collapse

Instance Method Details

#boundsObject



19
20
21
# File 'lib/rays/bitmap.rb', line 19

def bounds()
  Bounds.new 0, 0, width, height
end

#eachObject



11
12
13
14
15
16
17
# File 'lib/rays/bitmap.rb', line 11

def each()
  height.times do |y|
    width.times do |x|
      yield self[x, y], x, y
    end
  end
end

#to_aObject



23
24
25
# File 'lib/rays/bitmap.rb', line 23

def to_a()
  map {|o| o}
end