|
|
|
|
@ -18,7 +18,7 @@ module Squib
|
|
|
|
|
# @api public |
|
|
|
|
def png(opts = {}) |
|
|
|
|
opts = needs(opts, [:range, :files, :x, :y, :alpha, :layout]) |
|
|
|
|
@progress_bar.start("Loading PNGs #{location(opts)}", opts[:range].size) do |bar| |
|
|
|
|
@progress_bar.start("Loading PNG(s)", opts[:range].size) do |bar| |
|
|
|
|
opts[:range].each do |i| |
|
|
|
|
@cards[i].png(opts[:file][i], opts[:x][i], opts[:y][i], opts[:alpha][i]) |
|
|
|
|
bar.increment |
|
|
|
|
@ -44,7 +44,7 @@ module Squib
|
|
|
|
|
# @api public |
|
|
|
|
def svg(opts = {}) |
|
|
|
|
p = needs(opts,[:range, :files, :svgid, :x, :y, :width, :height, :layout]) |
|
|
|
|
@progress_bar.start("Loading SVGs #{location(opts)}", p[:range].size) do |bar| |
|
|
|
|
@progress_bar.start("Loading SVG(s)", p[:range].size) do |bar| |
|
|
|
|
p[:range].each do |i| |
|
|
|
|
@cards[i].svg(p[:file][i], p[:id][i], p[:x][i], p[:y][i], |
|
|
|
|
p[:width][i], p[:height][i]) |
|
|
|
|
|