parent
d5bf9062a2
commit
2a86b8f215
|
|
@ -40,6 +40,7 @@ module Squib
|
||||||
trim_radius: 38,
|
trim_radius: 38,
|
||||||
trim: 0,
|
trim: 0,
|
||||||
width: 3300,
|
width: 3300,
|
||||||
|
range: :all,
|
||||||
rtl: false,
|
rtl: false,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
@ -80,9 +81,14 @@ module Squib
|
||||||
|
|
||||||
def validate_rows(arg)
|
def validate_rows(arg)
|
||||||
raise 'columns must be an integer' unless columns.respond_to? :to_i
|
raise 'columns must be an integer' unless columns.respond_to? :to_i
|
||||||
return 1 if @deck_size < columns
|
count = if range == :all
|
||||||
|
@deck_size
|
||||||
|
else
|
||||||
|
count = range.to_a.length
|
||||||
|
end
|
||||||
|
return 1 if count <= columns
|
||||||
return arg if arg.respond_to? :to_i
|
return arg if arg.respond_to? :to_i
|
||||||
(@deck_size.to_i / columns.to_i).ceil
|
(count.to_f / columns.to_f).ceil
|
||||||
end
|
end
|
||||||
|
|
||||||
def full_filename
|
def full_filename
|
||||||
|
|
|
||||||
|
|
@ -692,10 +692,9 @@ cairo: set_source([MockDouble, 300, 0])
|
||||||
cairo: paint([])
|
cairo: paint([])
|
||||||
cairo: set_source([MockDouble, 400, 0])
|
cairo: set_source([MockDouble, 400, 0])
|
||||||
cairo: paint([])
|
cairo: paint([])
|
||||||
surface: write_to_png(["_output/sample_excel_resources_00.png"])
|
cairo: set_source([MockDouble, 0, 101])
|
||||||
cairo: set_source([MockDouble, 0, 0])
|
|
||||||
cairo: paint([])
|
cairo: paint([])
|
||||||
surface: write_to_png(["_output/sample_excel_resources_01.png"])
|
surface: write_to_png(["_output/sample_excel_resources_00.png"])
|
||||||
surface: finish([])
|
surface: finish([])
|
||||||
surface: finish([])
|
surface: finish([])
|
||||||
surface: finish([])
|
surface: finish([])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue