Squash @felixleong's pdf-template feature.
I will be making revisions based on this, but this is all of his hard work. Thank you!!! Conflicts: squib.gemspec
This commit is contained in:
committed by
Andy Meneely
parent
c6aa3983c4
commit
25bf0d7a67
@@ -0,0 +1,10 @@
|
||||
require 'squib'
|
||||
|
||||
Squib::Deck.new(width: '63mm', height: '88mm', cards: 8) do
|
||||
rect fill_color: :gray
|
||||
text(
|
||||
str: %w[Front_1 Front_2 Front_3 Front_4 Back_1 Back_2 Back_3 Back_4],
|
||||
x: '3mm', y: '3mm'
|
||||
)
|
||||
save_pdf file: 'fold_sheet.pdf', template_file: 'templates/fold_sheet.yml'
|
||||
end
|
||||
@@ -0,0 +1,14 @@
|
||||
require 'squib'
|
||||
|
||||
Squib::Deck.new(width: '65.8mm', height: '76mm', cards: 9) do
|
||||
polygon(
|
||||
x: '32.9mm', y: '38mm', n: 6, radius: '38mm', angle: 1.571,
|
||||
stroke_color: :black, stroke_width: '0.014in', fill_color: :pink
|
||||
)
|
||||
text(
|
||||
str: %w[One Two Three Four Five Six Seven Eight Nine],
|
||||
x: '27mm', y: '35mm', width: '11.8mm', height: '6mm',
|
||||
align: :center, valign: :middle
|
||||
)
|
||||
save_pdf file: 'hex_tiles.pdf', template_file: 'templates/hex_tiles.yml'
|
||||
end
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
sheet_width: 297mm
|
||||
sheet_height: 210mm
|
||||
card_width: 63.0mm
|
||||
card_height: 88.0mm
|
||||
cards:
|
||||
- x: 16.5mm
|
||||
y: 13.0mm
|
||||
- x: 83.5mm
|
||||
y: 13.0mm
|
||||
- x: 150.5mm
|
||||
y: 13.0mm
|
||||
- x: 217.5mm
|
||||
y: 13.0mm
|
||||
- x: 16.5mm
|
||||
y: 109.0mm
|
||||
rotate: :turnaround
|
||||
- x: 83.5mm
|
||||
y: 109.0mm
|
||||
rotate: :turnaround
|
||||
- x: 150.5mm
|
||||
y: 109.0mm
|
||||
rotate: :turnaround
|
||||
- x: 217.5mm
|
||||
y: 109.0mm
|
||||
rotate: :turnaround
|
||||
crop_line:
|
||||
lines:
|
||||
- type: :vertical
|
||||
position: 16.5mm
|
||||
- type: :vertical
|
||||
position: 79.5mm
|
||||
- type: :vertical
|
||||
position: 83.5mm
|
||||
- type: :vertical
|
||||
position: 146.5mm
|
||||
- type: :vertical
|
||||
position: 150.5mm
|
||||
- type: :vertical
|
||||
position: 213.5mm
|
||||
- type: :vertical
|
||||
position: 217.5mm
|
||||
- type: :vertical
|
||||
position: 280.5mm
|
||||
- type: :horizontal
|
||||
position: 13.0mm
|
||||
- type: :horizontal
|
||||
position: 101.0mm
|
||||
- type: :horizontal
|
||||
position: 109.0mm
|
||||
- type: :horizontal
|
||||
position: 197.0mm
|
||||
- type: :horizontal
|
||||
position: 105.0mm
|
||||
style: :dashed
|
||||
color: :red
|
||||
overlay_on_cards: true
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
sheet_width: 210mm
|
||||
sheet_height: 297.000000mm
|
||||
card_width: 65.800000mm
|
||||
card_height: 76.000000mm
|
||||
cards:
|
||||
- x: 6.300000mm
|
||||
y: 5.000000mm
|
||||
- x: 6.300000mm
|
||||
y: 81.000000mm
|
||||
- x: 6.300000mm
|
||||
y: 157.000000mm
|
||||
- x: 72.100000mm
|
||||
y: 43.000000mm
|
||||
- x: 72.100000mm
|
||||
y: 119.000000mm
|
||||
- x: 72.100000mm
|
||||
y: 195.000000mm
|
||||
- x: 137.900000mm
|
||||
y: 5.000000mm
|
||||
- x: 137.900000mm
|
||||
y: 81.000000mm
|
||||
- x: 137.900000mm
|
||||
y: 157.000000mm
|
||||
@@ -0,0 +1,8 @@
|
||||
require 'squib'
|
||||
|
||||
Squib::Deck.new(width: '63mm', height: '88mm', cards: 9) do
|
||||
text(
|
||||
str: %w[One Two Three Four Five Six Seven Eight Nine], x: '3mm', y: '3mm'
|
||||
)
|
||||
save_pdf file: 'use_package_tmpl.pdf', template_file: 'a4_poker_card_9up.yml'
|
||||
end
|
||||
Reference in New Issue
Block a user