Class: Rays::Image

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rays/image.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, pixel_density: 1, smooth: false) ⇒ Image

Returns a new instance of Image.



16
17
18
# File 'lib/rays/image.rb', line 16

def initialize(*args, pixel_density: 1, smooth: false)
  initialize! args, pixel_density, smooth
end

Instance Method Details

#bitmap(modify = false) ⇒ Object



33
34
35
# File 'lib/rays/image.rb', line 33

def bitmap(modify = false)
  get_bitmap modify
end

#boundsObject



29
30
31
# File 'lib/rays/image.rb', line 29

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

#paint(&block) ⇒ Object



20
21
22
23
# File 'lib/rays/image.rb', line 20

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

#sizeObject



25
26
27
# File 'lib/rays/image.rb', line 25

def size()
  return width, height
end