class Tracksperanto::Tool::Pad

This tool pads the comp or crops it if given negative values. Use it to say unpad some fucked-up telecine transfers. The padding is in fractional units of the total width and height

Public Class Methods

action_description() click to toggle source
# File lib/tools/pad.rb, line 11
def self.action_description
  "Pad or crop the image by a fraction of it's original size"
end

Public Instance Methods

export_point(frame, float_x, float_y, float_residual) click to toggle source
Calls superclass method
# File lib/tools/pad.rb, line 22
def export_point(frame, float_x, float_y, float_residual)
  super(frame, float_x - @shift_left, float_y - @shift_bottom, float_residual)
end
start_export(w, h) click to toggle source
Calls superclass method
# File lib/tools/pad.rb, line 15
def start_export(w, h)
  @shift_left, @shift_bottom = w * left_pad, h * bottom_pad
  w_mult = 1 + left_pad + right_pad
  h_mult = 1 + bottom_pad + top_pad
  super((w * w_mult).ceil, (h * h_mult).ceil)
end