👮 fix space after comma

This commit is contained in:
Andy Meneely
2016-03-17 23:22:16 -04:00
parent a768561e91
commit 8a9552126c
15 changed files with 186 additions and 186 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
require 'squib'
data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
'level' => [1,2,3]}
'level' => [1, 2, 3]}
Squib::Deck.new(width: 825, height: 1125, cards: 3) do
background color: :white
@@ -12,7 +12,7 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
text str: data['level'], x: 75, y: 85, width: 128,
font: 'Arial 72', align: :center
png range: [0,2], file: 'shiny-purse.png', x: 620, y: 75
png range: [0, 2], file: 'shiny-purse.png', x: 620, y: 75
svg range: 1..2, file: 'spanner.svg', x: 620, y: 218
save prefix: 'basic_', format: :png
+1 -1
View File
@@ -22,7 +22,7 @@ end
Squib::Deck.new(width: 3000, height: 1500) do
colors = (Cairo::Color.constants - %i(HEX_RE Base RGB CMYK HSV X11))
colors.sort_by! {|c| Cairo::Color.parse(c).to_s}
x,y,w,h = 0,0,300,50
x, y, w, h = 0, 0, 300, 50
colors.each_with_index do |color, i|
rect x: x, y: y, width: w, height: h, fill_color: color
text str: color.to_s, x: x + 5, y: y+13, font: 'Sans Bold 16',
+1 -1
View File
@@ -67,6 +67,6 @@ Squib::Deck.new do
use_layout file: 'custom-layout.yml'
use_layout file: 'custom-layout2.yml'
text str: 'The Title', layout: :title # from custom-layout.yml
text str: 'The Subtitle',layout: :subtitle # redefined in custom-layout2.yml
text str: 'The Subtitle', layout: :subtitle # redefined in custom-layout2.yml
save_png prefix: 'layout3_'
end
+4 -4
View File
@@ -2,7 +2,7 @@ require 'squib'
data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
'type' => ['Thug', 'Thinker', 'Thinker'],
'level' => [1,2,3]}
'level' => [1, 2, 3]}
Squib::Deck.new(width: 825, height: 1125, cards: 3) do
# Default range is :all
@@ -26,7 +26,7 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
text range: -2..-1, str: 'Grifter and Mastermind only!', x: 25, y: 650
# We can use Arrays too!
text range: [0,2], str: 'Thief and Mastermind only!!', x: 25, y:300
text range: [0, 2], str: 'Thief and Mastermind only!!', x: 25, y:300
# Just about everything in Squib can be given an array that
# corresponds to the deck's cards. This allows for each card to be styled differently
@@ -38,13 +38,13 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
# Useful idiom: construct a hash from card names back to its index (ID),
# then use a range. No need to memorize IDs, and you can add cards easily
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i}
id = {} ; data['name'].each_with_index{ |name, i| id[name] = i}
text range: id['Thief']..id['Grifter'],
str: 'Thief through Grifter with id lookup!!',
x:25, y: 400
# Useful idiom: generate arrays from a column called 'type'
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i}
type = {}; data['type'].each_with_index{ |t, i| (type[t] ||= []) << i}
text range: type['Thinker'],
str: 'Only for Thinkers!',
x:25, y: 500
+1 -1
View File
@@ -2,7 +2,7 @@
require 'squib'
data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
'level' => [1,2,3]}
'level' => [1, 2, 3]}
longtext = "This is left-justified text, with newlines.\nWhat do you know about tweetle beetles? well... When tweetle beetles fight, it's called a tweetle beetle battle. And when they battle in a puddle, it's a tweetle beetle puddle battle. AND when tweetle beetles battle with paddles in a puddle, they call it a tweetle beetle puddle paddle battle. AND... When beetles battle beetles in a puddle paddle battle and the beetle battle puddle is a puddle in a bottle... ..they call this a tweetle beetle bottle puddle paddle battle muddle."
Squib::Deck.new(width: 825, height: 1125, cards: 3) do