Sha256: 5f82c7d5119adc7e664fc5f1c44c69c5be9e98372aa4d6a7e1efb80199130179

Contents?: true

Size: 367 Bytes

Versions: 9

Compression:

Stored size: 367 Bytes

Contents

# -*- coding: utf-8 -*-


require 'rays/ext'


module Rays


  class Bitmap

    include Enumerable

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

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

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

  end# Bitmap


end# Rays

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rays-0.1.21 lib/rays/bitmap.rb
rays-0.1.20 lib/rays/bitmap.rb
rays-0.1.19 lib/rays/bitmap.rb
rays-0.1.18 lib/rays/bitmap.rb
rays-0.1.17 lib/rays/bitmap.rb
rays-0.1.16 lib/rays/bitmap.rb
rays-0.1.15 lib/rays/bitmap.rb
rays-0.1.14 lib/rays/bitmap.rb
rays-0.1.13 lib/rays/bitmap.rb