Class: Rays::Bitmap
Instance Method Summary collapse
Instance Method Details
#bounds ⇒ Object
22 23 24 |
# File 'lib/rays/bitmap.rb', line 22 def bounds() Bounds.new 0, 0, width, height end |
#each ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rays/bitmap.rb', line 14 def each() height.times do |y| width.times do |x| yield self[x, y], x, y end end end |
#to_a ⇒ Object
26 27 28 |
# File 'lib/rays/bitmap.rb', line 26 def to_a() map {|o| o} end |