Added valign, renaming text
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env ruby
|
||||
require 'squib'
|
||||
|
||||
Squib::Deck.new(width: 825, height: 1125, cards: 16) do
|
||||
background color: :gray
|
||||
rect x: 38, y: 38, width: 750, height: 1050, x_radius: 38, y_radius: 38
|
||||
|
||||
text str: (1..16).to_a, x: 220, y: 78, font: 'Arial 54'
|
||||
|
||||
save_pdf file: "sample.pdf", margin: 50, gap: 5, trim: 38
|
||||
end
|
||||
|
||||
puts "Done!"
|
||||
@@ -19,12 +19,12 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
|
||||
text str: "Font strings are expressive!", x:65, y: 300,
|
||||
font: 'Arial,Verdana weight=900 style=oblique 36'
|
||||
|
||||
text str: "This text has fixed width, fixed height, center-aligned, and has a red hint",
|
||||
text str: "This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint",
|
||||
hint: :red,
|
||||
x: 65, y: 400,
|
||||
width: 300, height: 200,
|
||||
align: :center,
|
||||
font: 'Arial 24'
|
||||
align: :center, valign: :middle,
|
||||
font: 'Arial 18'
|
||||
|
||||
text str: "Ellipsization!\nThe ultimate question of life, the universe, and everything to life and everything is 42",
|
||||
hint: :green, font: 'Arial 22',
|
||||
Reference in New Issue
Block a user