👮 spaces around operators

This commit is contained in:
Andy Meneely
2016-03-17 23:40:41 -04:00
parent 5e09e0f1e1
commit 310030eee4
17 changed files with 48 additions and 48 deletions
+11 -11
View File
@@ -4,15 +4,15 @@ Squib::Deck.new(width: 825, height: 1125, cards: 1) do
background color: :white
y = 0
text color: '#f00', str: '3-hex', x: 50, y: y+=50
text color: '#f00', str: '3-hex (alpha)', x: 50, y: y+=50
text color: '#ff0000', str: '6-hex', x: 50, y: y+=50
text color: '#ff000099', str: '8-hex(alpha)', x: 50, y: y+=50
text color: '#ffff00000000', str: '12-hex', x: 50, y: y+=50
text color: '#ffff000000009999', str: '12-hex (alpha)', x: 50, y: y+=50
text color: :burnt_orange, str: 'Symbols of constants too', x: 50, y: y+=50
text color: '(0,0)(400,0) blue@0.0 red@1.0', str: 'Linear gradients!', x: 50, y: y+=50
text color: '(200,500,10)(200,500,100) blue@0.0 red@1.0', str: 'Radial gradients!', x: 50, y: y+=50
text color: '#f00', str: '3-hex', x: 50, y: y += 50
text color: '#f00', str: '3-hex (alpha)', x: 50, y: y += 50
text color: '#ff0000', str: '6-hex', x: 50, y: y += 50
text color: '#ff000099', str: '8-hex(alpha)', x: 50, y: y += 50
text color: '#ffff00000000', str: '12-hex', x: 50, y: y += 50
text color: '#ffff000000009999', str: '12-hex (alpha)', x: 50, y: y += 50
text color: :burnt_orange, str: 'Symbols of constants too', x: 50, y: y += 50
text color: '(0,0)(400,0) blue@0.0 red@1.0', str: 'Linear gradients!', x: 50, y: y += 50
text color: '(200,500,10)(200,500,100) blue@0.0 red@1.0', str: 'Radial gradients!', x: 50, y: y += 50
# see gradients.rb sample for more on gradients
save_png prefix: 'colors_'
@@ -25,8 +25,8 @@ Squib::Deck.new(width: 3000, height: 1500) do
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',
color: (Cairo::Color.parse(color).to_hsv.v > 0.9) ? '#000': '#fff'
text str: color.to_s, x: x + 5, y: y + 13, font: 'Sans Bold 16',
color: (Cairo::Color.parse(color).to_hsv.v > 0.9) ? '#000' : '#fff'
y += h
if y > @height
x += w
+1 -1
View File
@@ -55,7 +55,7 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
range = hearts.each_index.select { |i| hearts[i] == n}
n.times do |i|
svg file: 'glass-heart.svg', range: range,
x: 150, y: 55 + i*42, width: 40, height: 40
x: 150, y: 55 + i * 42, width: 40, height: 40
end
end
+1 -1
View File
@@ -9,7 +9,7 @@ Squib::Deck.new(cards: 4) do
text str: %w(Grifter Thief Thug Kingpin),
font: 'Helvetica,Sans weight=800 120',
x: 78, y: 78, width: '2.25in', align: :center
svg file: 'spanner.svg', x: (825-500)/2, y: 500, width: 500, height: 500
svg file: 'spanner.svg', x: (825 - 500) / 2, y: 500, width: 500, height: 500
# Defaults are pretty sensible.
showcase file: 'showcase.png'
+1 -1
View File
@@ -37,7 +37,7 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
# Extents come back as an array of hashes, which can get split out like this
ws = extents.inject([]) { |arr, ext| arr << ext[:width] + 10; arr }
hs = extents.inject([]) { |arr, ext| arr << ext[:height] + 10; arr }
rect x: 65 - margin/2, y: 550 - margin/2,
rect x: 65 - margin / 2, y: 550 - margin / 2,
width: ws, height: hs,
radius: 10, stroke_color: :black