👮 fix extra spaces
This commit is contained in:
@@ -47,7 +47,7 @@ module Squib
|
||||
trans = Args::Transform.new.load!(opts, expand_by: @deck_size, layout: @layout, dpi: @dpi)
|
||||
ifile = Args::InputFile.new.load!(opts, expand_by: @deck_size, layout: @layout, dpi: @dpi)
|
||||
svg_args = Args::SvgSpecial.new.load!(opts, expand_by: @deck_size, layout: @layout, dpi: @dpi)
|
||||
rule = { type: :png, file: ifile, box: box, paint: paint, trans: trans, adjust: adjust }
|
||||
rule = { type: :png, file: ifile, box: box, paint: paint, trans: trans, adjust: adjust }
|
||||
rule[:draw] = Proc.new do |card, x, y|
|
||||
i = card.index
|
||||
b = box[i]
|
||||
|
||||
@@ -84,7 +84,7 @@ module Squib
|
||||
attribute = "@#{param}"
|
||||
val = instance_variable_get(attribute)
|
||||
if val.respond_to? :each
|
||||
new_val = val.map.with_index{ |v, i| send(method, v, i) }
|
||||
new_val = val.map.with_index{ |v, i| send(method, v, i) }
|
||||
instance_variable_set(attribute, new_val)
|
||||
else
|
||||
instance_variable_set(attribute, send(method, val))
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ module Squib
|
||||
@width = Args::UnitConversion.parse width, dpi
|
||||
@height = Args::UnitConversion.parse height, dpi
|
||||
cards.times{ |i| @cards << Squib::Card.new(self, @width, @height, i) }
|
||||
@layout = LayoutParser.load_layout(layout)
|
||||
@layout = LayoutParser.load_layout(layout)
|
||||
enable_groups_from_env!
|
||||
if block_given?
|
||||
instance_eval(&block) # here we go. wheeeee!
|
||||
|
||||
@@ -40,7 +40,7 @@ module Squib
|
||||
linear.matrix = matrix # match the coordinate systems - see bug 127
|
||||
@cairo_cxt.set_source(linear)
|
||||
elsif match = arg.match(RADIAL_GRADIENT)
|
||||
x1, y1, r1, x2, y2, r2 = match.captures
|
||||
x1, y1, r1, x2, y2, r2 = match.captures
|
||||
radial = Cairo::RadialPattern.new(x1.to_f, y1.to_f, r1.to_f,
|
||||
x2.to_f, y2.to_f, r2.to_f)
|
||||
radial.matrix = matrix # match the coordinate systems - see bug 127
|
||||
|
||||
@@ -33,7 +33,7 @@ module Squib
|
||||
cc.move_to(x, y + 0.5*h) # start west
|
||||
cc.curve_to(x, y + 0.25*h, # west to north
|
||||
x + 0.25*w, y,
|
||||
x + 0.5*w, y)
|
||||
x + 0.5*w, y)
|
||||
cc.curve_to(x + 0.75*w, y, # north to east
|
||||
x + w, y + 0.25*h,
|
||||
x + w, y + 0.5*h)
|
||||
|
||||
@@ -140,7 +140,7 @@ module Squib
|
||||
font_desc.size = para.font_size * Pango::SCALE unless para.font_size.nil?
|
||||
layout = cc.create_pango_layout
|
||||
layout.font_description = font_desc
|
||||
layout.text = para.str
|
||||
layout.text = para.str
|
||||
if para.markup
|
||||
para.str = @deck.typographer.process(layout.text)
|
||||
layout.markup = para.str
|
||||
|
||||
Reference in New Issue
Block a user