class Castaway::Element::Still
Attributes
filename[R]
info[R]
Public Class Methods
new(production, scene, filename, full: false)
click to toggle source
Calls superclass method
Castaway::Element::Base::new
# File lib/castaway/element/still.rb, line 10 def initialize(production, scene, filename, full: false) super(production, scene) @filename = production.resource(filename) @info = MiniMagick::Image.new(@filename) @size = if full # scale to production resolution production.resolution else # use native image size Castaway::Size.new(@info.width, @info.height) end end
Public Instance Methods
_prepare_canvas(_t, canvas)
click to toggle source
# File lib/castaway/element/still.rb, line 25 def _prepare_canvas(_t, canvas) canvas << @filename end