lib/squib/args/sheet.rb in squib-0.14.beta1 vs lib/squib/args/sheet.rb in squib-0.14.0

- old
+ new

@@ -19,10 +19,11 @@ @dpi = dpi end def self.parameters { + count_format: '%02d', crop_margin_bottom: 0, crop_margin_left: 0, crop_margin_right: 0, crop_margin_top: 0, crop_marks: false, @@ -33,10 +34,11 @@ file: 'sheet.png', fill_color: :white, gap: 0, height: 2550, margin: 75, + prefix: 'sheet_', rows: :infinite, columns: 5, trim_radius: 38, trim: 0, width: 3300, @@ -89,11 +91,15 @@ return 1 if count <= columns return arg if arg.respond_to? :to_i (count.to_f / columns.to_f).ceil end - def full_filename - "#{dir}/#{file}" + def full_filename(i=nil) + if i.nil? + "#{dir}/#{file}" + else + "#{dir}/#{prefix}#{count_format % i}.png" + end end def crop_coords(x, y, deck_w, deck_h) case crop_marks when false