|
|
|
@ -1,3 +1,5 @@ |
|
|
|
|
|
|
|
require 'squib/graphics/cairo_context_wrapper' |
|
|
|
|
|
|
|
|
|
|
|
module Squib |
|
|
|
module Squib |
|
|
|
class Deck |
|
|
|
class Deck |
|
|
|
|
|
|
|
|
|
|
|
@ -16,8 +18,9 @@ module Squib |
|
|
|
out_width = range.size * ((@width - 2*trim) * scale * offset) + 2*margin |
|
|
|
out_width = range.size * ((@width - 2*trim) * scale * offset) + 2*margin |
|
|
|
out_height = reflect_offset + (1.0 + reflect_percent) * (@height - 2*trim) + 2*margin |
|
|
|
out_height = reflect_offset + (1.0 + reflect_percent) * (@height - 2*trim) + 2*margin |
|
|
|
out_cc = Cairo::Context.new(Cairo::ImageSurface.new(out_width, out_height)) |
|
|
|
out_cc = Cairo::Context.new(Cairo::ImageSurface.new(out_width, out_height)) |
|
|
|
out_cc.set_source_color(fill_color) |
|
|
|
wrapper = Squib::Graphics::CairoContextWrapper.new(out_cc) |
|
|
|
out_cc.paint |
|
|
|
wrapper.set_source_squibcolor(fill_color) |
|
|
|
|
|
|
|
wrapper.paint |
|
|
|
|
|
|
|
|
|
|
|
cards = range.collect { |i| @cards[i] } |
|
|
|
cards = range.collect { |i| @cards[i] } |
|
|
|
cards.each_with_index do |card, i| |
|
|
|
cards.each_with_index do |card, i| |
|
|
|
|