Class: MagickCanvas::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Magick
Defined in:
lib/magick_canvas/base.rb

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



13
14
15
16
# File 'lib/magick_canvas/base.rb', line 13

def initialize
  self.image_list = ImageList.new
  self.center = Point.new(width * 0.5, height * 0.5)
end

Instance Method Details

#openObject



18
19
20
21
# File 'lib/magick_canvas/base.rb', line 18

def open
  write
  `hash open > /dev/null 2>&1 && open -a #{app} #{path}`
end

#radians(degrees) ⇒ Object



28
29
30
# File 'lib/magick_canvas/base.rb', line 28

def radians(degrees)
  degrees * Math::PI / 180
end

#writeObject



23
24
25
26
# File 'lib/magick_canvas/base.rb', line 23

def write
  draw_frames
  image_list.write(path)
end