Class: MagickCanvas::Base
- Inherits:
-
Object
- Object
- MagickCanvas::Base
- Extended by:
- Forwardable
- Includes:
- Magick
- Defined in:
- lib/magick_canvas/base.rb
Instance Method Summary collapse
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #open ⇒ Object
- #radians(degrees) ⇒ Object
- #write ⇒ Object
Constructor Details
#initialize ⇒ Base
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
#open ⇒ Object
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 |
#write ⇒ Object
23 24 25 26 |
# File 'lib/magick_canvas/base.rb', line 23 def write draw_frames image_list.write(path) end |