More exploration spikes

* Playing with PDF support
* Added background
* Added rectangle
* Split save to save_pdf and save_images since PDFs are way different
* Working on text rendering (non-pango for now, but that'll change)
This commit is contained in:
Andy Meneely
2014-07-13 01:10:24 -04:00
parent 6fd2ab8684
commit e036d36737
7 changed files with 97 additions and 11 deletions
+12 -4
View File
@@ -2,11 +2,19 @@
require 'squib'
deck width: 825, height: 1125, cards: 3
background [1.0,1.0,1.0]
data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
'level' => [1,2,3]}
text str: data['name'], x: 10, y: 250
text str: data['level'], x: 10, y:10
rect x: 0, y: 0, width: 825, height: 1125, x_radius: 30, y_radius: 30
save format: :png
text str: data['name'], x: 10, y: 250
rect x: 10, y: 250, width: 100, height: 100
text str: data['level'], x: 10, y: 15
save format: :png
save format: :pdf
puts "Done!"