lib/squib/graphics/save_images.rb in squib-0.2.0 vs lib/squib/graphics/save_images.rb in squib-0.3.0
- old
+ new
@@ -1,17 +1,17 @@
module Squib
class Card
# :nodoc:
# @api private
- def save_png(i, dir, prefix, do_rotate, angle)
+ def save_png(i, dir, prefix, count_format, do_rotate, angle)
if [true, :clockwise, :counterclockwise].include?(do_rotate)
surface = rotated_image(angle)
else
surface = @cairo_surface
end
- write_png(surface, i, dir, prefix)
+ write_png(surface, i, dir, prefix, count_format)
end
# :nodoc:
# @api private
def rotated_image(angle)
@@ -23,11 +23,11 @@
rotated_cc.paint
rotated_cc.target
end
# :nodoc:
# @api private
- def write_png(surface, i, dir, prefix)
- surface.write_to_png("#{dir}/#{prefix}#{i}.png")
+ def write_png(surface, i, dir, prefix, count_format)
+ surface.write_to_png("#{dir}/#{prefix}#{count_format % i}.png")
end
end
end