Class: Tracksperanto::Tool::Pad
Overview
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
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Methods included from Parameters
included, #parameter, #parameters
Methods included from SimpleExport
Methods included from ConstName
Methods included from BlockInit
Methods included from Casts
#cast_to_bool, #cast_to_float, #cast_to_int, #cast_to_string, included
Constructor Details
This class inherits a constructor from Tracksperanto::Tool::Base
Class Method Details
.action_description ⇒ Object
12 13 14 |
# File 'lib/tools/pad.rb', line 12 def self.action_description "Pad or crop the image by a fraction of it's original size" end |
Instance Method Details
#export_point(frame, float_x, float_y, float_residual) ⇒ Object
23 24 25 |
# File 'lib/tools/pad.rb', line 23 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) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/tools/pad.rb', line 16 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 |