Sha256: 71ecb8852b9d6cfab5ccb86ebecd4b2710d912d7eabea8b8759aabb6e1a9fa2a

Contents?: true

Size: 547 Bytes

Versions: 4

Compression:

Stored size: 547 Bytes

Contents

require 'forwardable'
require 'rays/ext'


module Rays


  class Image

    extend Forwardable

    def_delegators :bitmap,           :pixels,  :[]

    def_delegators :bitmap_for_write, :pixels=, :[]=

    def paint(&block)
      painter.paint self, &block
      self
    end

    def size()
      return width, height
    end

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

    def bitmap(modify = false)
      get_bitmap modify
    end

    private def bitmap_for_write()
      get_bitmap true
    end

  end# Image


end# Rays

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rays-0.3 lib/rays/image.rb
rays-0.2.1 lib/rays/image.rb
rays-0.2 lib/rays/image.rb
rays-0.1.49 lib/rays/image.rb