Add support for embedding pngs

Refactored into passing a Proc. I love those things.
This commit is contained in:
Andy Meneely
2015-03-19 17:00:27 -04:00
parent e2b45a2047
commit ac2b46921d
3 changed files with 33 additions and 6 deletions
+3 -2
View File
@@ -5,12 +5,13 @@ Squib::Deck.new do
rect x: 0, y: 0, width: 825, height: 1125
rect x: 0, y: 0, width: 180, height: 180, stroke_color: :red
embed_text = 'Take 1 :tool:and gain 2 :health:. Take 2 :tool: if level 2'
embed_text = 'Take 1 :tool:and gain 2 :health:. Take 2 :tool: and gain 3 :purse: if level 2.'
text(str: embed_text, font: 'Sans 18',
x: 0, y: 0, width: 180,
align: :right, ellipsize: false, justify: false) do |embed|
align: :left, ellipsize: false, justify: false) do |embed|
embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
embed.png key: ':purse:', width: 28, height: 28, file: 'shiny-purse.png'
end
save_png prefix: 'embed_'