SVG scaling is now supported!
This commit is contained in:
+2
-2
@@ -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,
|
||||
|
||||
@@ -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!"
|
||||
Reference in New Issue
Block a user