DEVELOPER_DOCS.rdoc in tracksperanto-2.3.1 vs DEVELOPER_DOCS.rdoc in tracksperanto-2.3.2
- old
+ new
@@ -44,19 +44,24 @@
include Tracksperanto
# Create the importer object, for example for a Shake script.
# get_importer will give you the good class even you get the capitalization
# wrong!
- some_importer = Tracksperanto.get_importer("shakescript").new(:width => 1024, :height => 576)
+ some_importer = Tracksperanto.get_importer("shakescript").new
+
+ # This importer needs to know width and height
+ some_importer.width = 1024
+ some_importer.height = 576
some_importer.io = File.open("source_file.fmt")
# The importer responds to each() so if your file is not too big you can just load all the trackers
# as an array. If you expect to have alot of trackers investigate a way to buffer them on disk
# instead (see Accumulator)
trackers = some_importer.to_a
# Create the exporter and pass the output file to it
- some_exporter = Tracksperanto.get_exporter("flamestabilizer").new(File.open("exported_file.other", "wb"))
+ destination_file = File.open("exported_file.other", "wb")
+ some_exporter = Tracksperanto.get_exporter("flamestabilizer").new(destination_file)
# Now add some middlewares, for example a Scale
scaler = Middleware::Scaler.new(some_exporter, :x_factor => 2)
# ... and a slip
slipper = Middleware::Slipper.new(scaler, :offset => 2)
\ No newline at end of file