text: fix valign when we only have an embed key

Fixes #134
This commit is contained in:
Andy Meneely
2016-03-15 23:07:23 -04:00
parent a8a9c954c9
commit 9cdd3c4d2f
2 changed files with 26 additions and 3 deletions
+14
View File
@@ -0,0 +1,14 @@
require 'squib'
require 'game_icons'
Squib::Deck.new(cards: 1) do
rect
text str: 'foo', x: 275, y: 75, width: 500, height: 500, valign: :middle, hint: :blue
text(str: '(heart)(heart2)',
x: 75, y: 75, width: 500, height: 500,
valign: :middle, hint: :red) do |embed|
embed.svg key: '(heart)', width: 50, height: 50, data: GameIcons.get('glass-heart').string
embed.svg key: '(heart2)', width: 50, height: 50, data: GameIcons.get('glass-heart').string
end
save_png prefix: 'bug_134_'
end