class Tracksperanto::Tool::Reformat

This tool reformats (scales) the track setup to a specific pixel resolution. Very useful for applying proxy tracks to full-res images

Public Class Methods

action_description() click to toggle source
# File lib/tools/reformat.rb, line 10
def self.action_description
  "Reformat the comp together with it's trackers to conform to a specific format"
end

Public Instance Methods

start_export( img_width, img_height) click to toggle source

Called on export start

Calls superclass method
# File lib/tools/reformat.rb, line 15
def start_export( img_width, img_height)
  @width ||= img_width # If they be nil
  @height ||= img_height
  
  x_factor, y_factor = (@width / img_width.to_f), (@height / img_height.to_f)  
  
  @stash = @exporter
  @exporter = Tracksperanto::Tool::Scaler.new(@exporter, :x_factor => x_factor, :y_factor => y_factor)
  super
end