SVG scaling is now supported!

This commit is contained in:
Andy Meneely
2014-07-22 14:54:09 -04:00
parent b021e9aca3
commit c2ec7947df
5 changed files with 35 additions and 16 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
Squib::Deck.new(width: 825, height: 1125, cards: 3) do
background color: :white
rect x: 38, y: 38, width: 750, height: 1050, x_radius: 38, y_radius: 38
rect x: 75, y: 75, width: 128, height: 128, x_radius: 25, y_radius: 25
rect x: 38, y: 38, width: 750, height: 1050, radius: 38
rect x: 75, y: 75, width: 128, height: 128, radius: 25
text str: data['name'], x: 220, y: 78, font: 'Arial 54'
text str: data['level'], x: 75, y: 85, width: 128,
+16
View File
@@ -0,0 +1,16 @@
require 'squib'
Squib::Deck.new(width: 825, height: 1125, cards: 1) do
background color: :white
rect x: 38, y: 38, width: 750, height: 1050, x_radius: 38, y_radius: 38
png file: 'shiny-purse.png', x: 620, y: 75
svg file: 'spanner.svg', x: 620, y: 218
# SVGs can be scaled too
svg file: 'spanner.svg', x: 50, y: 50, width: 250, height: 250
save prefix: 'load_images_', format: :png
end
puts "Done!"