squib 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +5 -4
  4. data/CHANGELOG.md +12 -2
  5. data/Gemfile +2 -0
  6. data/README.md +177 -31
  7. data/Rakefile +1 -0
  8. data/lib/squib/api/shapes.rb +25 -0
  9. data/lib/squib/api/text.rb +9 -3
  10. data/lib/squib/api/text_embed.rb +64 -0
  11. data/lib/squib/args/typographer.rb +112 -0
  12. data/lib/squib/args/unit_conversion.rb +4 -0
  13. data/lib/squib/card.rb +2 -1
  14. data/lib/squib/constants.rb +32 -1
  15. data/lib/squib/deck.rb +6 -1
  16. data/lib/squib/graphics/cairo_context_wrapper.rb +9 -1
  17. data/lib/squib/graphics/save_doc.rb +1 -1
  18. data/lib/squib/graphics/shapes.rb +16 -0
  19. data/lib/squib/graphics/showcase.rb +2 -0
  20. data/lib/squib/graphics/text.rb +105 -23
  21. data/lib/squib/project_template/config.yml +13 -0
  22. data/lib/squib/version.rb +1 -1
  23. data/samples/config_disable_quotes.yml +3 -0
  24. data/samples/config_text_markup.rb +20 -0
  25. data/samples/config_text_markup.yml +9 -0
  26. data/samples/draw_shapes.rb +5 -0
  27. data/samples/embed_text.rb +90 -0
  28. data/samples/text_options.rb +21 -7
  29. data/spec/api/api_text_spec.rb +3 -3
  30. data/spec/args/typographer_spec.rb +71 -0
  31. data/spec/data/samples/autoscale_font.rb.txt +9 -9
  32. data/spec/data/samples/basic.rb.txt +12 -12
  33. data/spec/data/samples/config_text_markup.rb.txt +75 -0
  34. data/spec/data/samples/csv_import.rb.txt +12 -12
  35. data/spec/data/samples/custom_config.rb.txt +2 -6
  36. data/spec/data/samples/draw_shapes.rb.txt +11 -0
  37. data/spec/data/samples/embed_text.rb.txt +295 -0
  38. data/spec/data/samples/excel.rb.txt +18 -18
  39. data/spec/data/samples/gradients.rb.txt +2 -2
  40. data/spec/data/samples/hello_world.rb.txt +2 -2
  41. data/spec/data/samples/portrait-landscape.rb.txt +2 -2
  42. data/spec/data/samples/ranges.rb.txt +48 -48
  43. data/spec/data/samples/saves.rb.txt +32 -32
  44. data/spec/data/samples/showcase.rb.txt +8 -8
  45. data/spec/data/samples/text_options.rb.txt +162 -120
  46. data/spec/data/samples/tgc_proofs.rb.txt +4 -4
  47. data/spec/graphics/graphics_text_spec.rb +13 -11
  48. data/spec/samples/samples_regression_spec.rb +2 -0
  49. data/spec/spec_helper.rb +22 -5
  50. data/squib.gemspec +1 -1
  51. data/squib.sublime-project +49 -0
  52. metadata +17 -16
@@ -25,3 +25,16 @@
25
25
  # Use a SVG cairo back end, instead of an in-memory buffer
26
26
  # backend: :memory # default
27
27
  # backend: :svg # can create scalable pdfs, but rendering done at the printer level is not as good as Cairo.
28
+
29
+ # Configure what text markup uses replace characters
30
+ # Below are the defaults
31
+ # lsquote: "\u2018" #note that Yaml wants double quotes here to use escape chars
32
+ # rsquote: "\u2019"
33
+ # ldquote: "\u201C"
34
+ # rdquote: "\u201D"
35
+ # em_dash: "\u2014"
36
+ # en_dash: "\u2013"
37
+ # ellipsis: "\u2026"
38
+
39
+ # We can also disallow smart quotes and only allow explicit replacements with ``LaTeX-style'' quotes.
40
+ # smart_quotes: false
data/lib/squib/version.rb CHANGED
@@ -6,5 +6,5 @@ module Squib
6
6
  # Most of the time this is in the alpha of the next release.
7
7
  # e.g. v0.0.5a is on its way to becoming v0.0.5
8
8
  #
9
- VERSION = '0.4.0'
9
+ VERSION = '0.5.0'
10
10
  end
@@ -0,0 +1,3 @@
1
+ # If we want to disable smart quoting and only allow explicit quoting within markup,
2
+ # use this option
3
+ smart_quotes: false
@@ -0,0 +1,20 @@
1
+ require 'squib'
2
+
3
+ Squib::Deck.new(config: 'config_text_markup.yml') do
4
+ background color: :white
5
+ text str: %{"'Yaml ain't markup', he says"},
6
+ x: 10, y: 10, width: 300, height: 200, font: 'Serif 20',
7
+ markup: true, hint: :cyan
8
+
9
+ text str: "Notice also the antialiasing method.",
10
+ x: 320, y: 10, width: 300, height: 200, font: 'Arial Bold 20'
11
+
12
+ save_png prefix: 'config_text_'
13
+ end
14
+
15
+ Squib::Deck.new(config: 'config_disable_quotes.yml') do
16
+ text str: %{This has typographic sugar --- and ``explicit'' quotes --- but the quotes are "dumb"},
17
+ x: 10, y: 10, width: 300, height: 200, font: 'Serif 20',
18
+ markup: true, hint: :cyan
19
+ save_png prefix: 'config_disable_text_'
20
+ end
@@ -0,0 +1,9 @@
1
+ # We can configure what characters actually get replaced by quoting them with unicode code points.
2
+ lsquote: "\u2018" #note that Yaml wants double quotes here to use escape chars
3
+ rsquote: "\u2019"
4
+ ldquote: "\u201C"
5
+ rdquote: "\u201D"
6
+ em_dash: "\u2014"
7
+ en_dash: "\u2013"
8
+ ellipsis: "\u2026"
9
+ antialias: gray
@@ -15,5 +15,10 @@ Squib::Deck.new do
15
15
  x2: 150, y2: 650,
16
16
  stroke_width: 25.0
17
17
 
18
+ curve x1: 50, y1: 850, cx1: 150, cy1: 700,
19
+ x2: 625, y2: 900, cx2: 150, cy2: 700,
20
+ stroke_width: 12.0, stroke_color: :cyan,
21
+ fill_color: :burgundy
22
+
18
23
  save_png prefix: 'shape_'
19
24
  end
@@ -0,0 +1,90 @@
1
+ require 'squib'
2
+
3
+ Squib::Deck.new do
4
+ background color: :white
5
+ rect x: 0, y: 0, width: 825, height: 1125, stroke_width: 2.0
6
+
7
+ embed_text = 'Take 11 :tool: and gain 2 :health:. Take <b>2</b> :tool: <i>and gain 3 :purse: if level 2.</i>'
8
+ text(str: embed_text, font: 'Sans 21',
9
+ x: 0, y: 0, width: 180, hint: :red,
10
+ align: :left, ellipsize: false, justify: false) do |embed|
11
+ # Notice how we use dx and dy to adjust the icon to not rest directly on the baseline
12
+ embed.svg key: ':tool:', width: 28, height: 28, dx: 0, dy: 4, file: 'spanner.svg'
13
+ embed.svg key: ':health:', width: 28, height: 28, dx: -2, dy: 4, file: 'glass-heart.svg'
14
+ embed.png key: ':purse:', width: 28, height: 28, dx: 0, dy: 4, file: 'shiny-purse.png'
15
+ end
16
+
17
+ embed_text = 'Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:'
18
+ text(str: embed_text, font: 'Sans 21',
19
+ x: 200, y: 0, width: 180, height: 300, valign: :middle,
20
+ align: :left, ellipsize: false, justify: false, hint: :cyan) do |embed|
21
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
22
+ embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
23
+ embed.png key: ':purse:', width: 28, height: 28, file: 'shiny-purse.png'
24
+ end
25
+
26
+ embed_text = 'This :tool: aligns on the bottom properly. :purse:'
27
+ text(str: embed_text, font: 'Sans 21',
28
+ x: 400, y: 0, width: 180, height: 300, valign: :bottom,
29
+ align: :left, ellipsize: false, justify: false, hint: :green) do |embed|
30
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
31
+ embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
32
+ embed.png key: ':purse:', width: 28, height: 28, file: 'shiny-purse.png'
33
+ end
34
+
35
+ embed_text = 'Wrapping multiples: These are 1 :tool::tool::tool: and these are multiple :tool::tool: :tool::tool:'
36
+ text(str: embed_text, font: 'Sans 21',
37
+ x: 600, y: 0, width: 180, height: 300, valign: :middle,
38
+ align: :left, ellipsize: false, justify: false, hint: :cyan) do |embed|
39
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
40
+ end
41
+
42
+ embed_text = ':tool:Justify will :tool: work too, and :purse: with more words just for fun'
43
+ text(str: embed_text, font: 'Sans 21',
44
+ x: 0, y: 320, width: 180, height: 300, valign: :bottom,
45
+ align: :left, ellipsize: false, justify: true, hint: :magenta) do |embed|
46
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
47
+ embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
48
+ embed.png key: ':purse:', width: 28, height: 28, file: 'shiny-purse.png'
49
+ end
50
+
51
+ embed_text = 'Right-aligned works :tool: with :health: and :purse:'
52
+ text(str: embed_text, font: 'Sans 21',
53
+ x: 200, y: 320, width: 180, height: 300, valign: :bottom,
54
+ align: :right, ellipsize: false, justify: false, hint: :magenta) do |embed|
55
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
56
+ embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
57
+ embed.png key: ':purse:', width: 28, height: 28, file: 'shiny-purse.png'
58
+ end
59
+
60
+ embed_text = ':tool:Center-aligned works :tool: with :health: and :purse:'
61
+ text(str: embed_text, font: 'Sans 21',
62
+ x: 400, y: 320, width: 180, height: 300,
63
+ align: :center, ellipsize: false, justify: false, hint: :magenta) do |embed|
64
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
65
+ embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
66
+ embed.png key: ':purse:', width: 28, height: 28, file: 'shiny-purse.png'
67
+ end
68
+
69
+ embed_text = 'Markup --- and typography replacements --- with ":tool:" icons <i>won\'t</i> fail'
70
+ text(str: embed_text, font: 'Serif 18', markup: true,
71
+ x: 600, y: 320, width: 180, height: 300,
72
+ align: :center, hint: :magenta) do |embed|
73
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
74
+ end
75
+
76
+ save_png prefix: 'embed_'
77
+ end
78
+
79
+ Squib::Deck.new(cards: 3) do
80
+
81
+ embed_text = 'Take 1 :tool: and gain 2 :health:.'
82
+ text(str: embed_text, font: 'Sans', font_size: [18, 32, 45],
83
+ x: 0, y: 0, width: 180, height: 300, valign: :bottom,
84
+ align: :left, ellipsize: false, justify: false, hint: :cyan) do |embed|
85
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
86
+ embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
87
+ end
88
+ save_png prefix: 'embed_multi_'
89
+ save_sheet prefix: 'embed_multisheet_', columns: 3
90
+ end
@@ -3,7 +3,7 @@ require 'squib'
3
3
 
4
4
  data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
5
5
  'level' => [1,2,3]}
6
- longtext = "This is left-justified text.\nWhat do you know about tweetle beetles? well... \nWhen 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. AND... When beetles fight these battles in a bottle with their paddles and the bottle's on a poodle and the poodle's eating noodles... ...they call this a muddle puddle tweetle poodle beetle noodle bottle paddle battle."
6
+ 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."
7
7
 
8
8
  Squib::Deck.new(width: 825, height: 1125, cards: 3) do
9
9
  background color: :white
@@ -23,12 +23,12 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
23
23
  text str: 'Font string sizes can be overridden per card.', x: 65, y: 350,
24
24
  font: 'Impact 36', font_size: [16, 20, 24]
25
25
 
26
- text str: 'This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint',
26
+ text str: 'This text has fixed width, fixed height, center-aligned, middle-valigned, has a red hint, and "smart quotes"',
27
27
  hint: :red,
28
28
  x: 65, y: 400,
29
29
  width: 300, height: 125,
30
- align: :center, valign: 'MIDDLE', #case-insenstive strings allowed too.
31
- font: 'Arial 18'
30
+ align: :center, valign: 'MIDDLE', # these can be specified with case-insenstive strings too
31
+ font: 'Serif 16', quotes: [:smart,:smart, :dumb]
32
32
 
33
33
  extents = text str: 'Ink extent return value',
34
34
  x: 65, y: 550,
@@ -41,12 +41,14 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
41
41
  width: ws, height: hs,
42
42
  radius: 10, stroke_color: :black
43
43
 
44
+ # If width & height are defined and the text will overflow the box, we can ellipsize.
44
45
  text str: "Ellipsization!\nThe ultimate question of life, the universe, and everything to life and everything is 42",
45
46
  hint: :green, font: 'Arial 22',
46
47
  x: 450, y: 400,
47
48
  width: 280, height: 180,
48
49
  ellipsize: true
49
50
 
51
+ # Text hints are guides for showing you how your text boxes are laid out exactly
50
52
  hint text: :cyan
51
53
  text str: 'Text hints are also globally togglable!',
52
54
  x: 65, y: 625,
@@ -60,17 +62,29 @@ Squib::Deck.new(width: 825, height: 1125, cards: 3) do
60
62
  x: 565, y: 675, angle: 0.2,
61
63
  font: 'Arial 18', hint: :red
62
64
 
65
+ # Text can be justified, and have newlines
63
66
  text str: longtext, font: 'Arial 16',
64
67
  x: 65, y: 700,
65
- width: inches(2.25), height: inches(1),
68
+ width: '1.5in', height: inches(1),
66
69
  justify: true
67
70
 
68
- text str: '<b>Markup</b> is also <i>quite</i> <s>easy</s> awesome',
71
+ # Here's how you embed images into text.
72
+ # Pass a block to the method call and use the given context
73
+ embed_text = 'Embedded icons! Take 1 :tool: and gain 2:health:. If Level 2, take 2 :tool:'
74
+ text(str: embed_text, font: 'Sans 18',
75
+ x: '1.8in', y: '2.5in', width: '0.85in',
76
+ align: :left, ellipsize: false) do |embed|
77
+ embed.svg key: ':tool:', width: 28, height: 28, file: 'spanner.svg'
78
+ embed.svg key: ':health:', width: 28, height: 28, file: 'glass-heart.svg'
79
+ end
80
+
81
+ text str: "<b>Markup</b> is <i>quite</i> <s>'easy'</s> <span fgcolor=\"\#ff0000\">awesome</span>. Can't beat those \"smart\" 'quotes', now with 10--20% more en-dashes --- and em-dashes --- with explicit ellipses too...",
69
82
  markup: true,
70
83
  x: 50, y: 1000,
71
84
  width: 750, height: 100,
72
85
  valign: :bottom,
73
- font: 'Arial 32', hint: :cyan
86
+ font: 'Serif 18', hint: :cyan
87
+
74
88
 
75
89
  save prefix: 'text_', format: :png
76
90
  end
@@ -6,7 +6,7 @@ describe Squib::Deck, '#text' do
6
6
  context 'fonts' do
7
7
  it "should use the default font when #text and #set_font don't specify" do
8
8
  card = instance_double(Squib::Card)
9
- expect(card).to receive(:text).with('a', 'Arial 36', *([anything] * 15)).once
9
+ expect(card).to receive(:text).with(anything, 'a', 'Arial 36', *([anything] * 15)).once
10
10
  Squib::Deck.new do
11
11
  @cards = [card]
12
12
  text str: 'a'
@@ -15,7 +15,7 @@ describe Squib::Deck, '#text' do
15
15
 
16
16
  it "should use the #set_font when #text doesn't specify" do
17
17
  card = instance_double(Squib::Card)
18
- expect(card).to receive(:text).with('a', 'Times New Roman 16', *([anything] * 15)).once
18
+ expect(card).to receive(:text).with(anything, 'a', 'Times New Roman 16', *([anything] * 15)).once
19
19
  Squib::Deck.new do
20
20
  @cards = [card]
21
21
  set font: 'Times New Roman 16'
@@ -25,7 +25,7 @@ describe Squib::Deck, '#text' do
25
25
 
26
26
  it 'should use the specified font no matter what' do
27
27
  card = instance_double(Squib::Card)
28
- expect(card).to receive(:text).with('a', 'Arial 18', *([anything] * 15)).once
28
+ expect(card).to receive(:text).with(anything, 'a', 'Arial 18', *([anything] * 15)).once
29
29
  Squib::Deck.new do
30
30
  @cards = [card]
31
31
  set font: 'Times New Roman 16'
@@ -0,0 +1,71 @@
1
+ require 'spec_helper'
2
+ require 'squib/args/typographer'
3
+
4
+ describe Squib::Args::Typographer do
5
+ subject(:t) { Squib::Args::Typographer.new }
6
+
7
+ it 'does nothing on a non-quoted string' do
8
+ expect(t.process(%{nothing})).to eq(%{nothing})
9
+ end
10
+
11
+ it 'left quotes at the beginning' do
12
+ expect(t.process(%{"foo})).to eq(%{\u201Cfoo})
13
+ end
14
+
15
+ it 'left quotes in the middle of the string' do
16
+ expect(t.process(%{hello "foo})).to eq(%{hello \u201Cfoo})
17
+ end
18
+
19
+ it 'right quotes at the end' do
20
+ expect(t.process(%{foo"})).to eq(%{foo\u201D})
21
+ end
22
+
23
+ it 'handles the entire string quoted' do
24
+ expect(t.process(%{"foo"})).to eq(%{\u201Cfoo\u201D})
25
+ end
26
+
27
+ it "quotes in the middle of the string" do
28
+ expect(t.process(%{hello "foo" world})).to eq(%{hello \u201Cfoo\u201D world})
29
+ end
30
+
31
+ it "single left quotes at the beginning" do
32
+ expect(t.process(%{'foo})).to eq(%{\u2018foo})
33
+ end
34
+
35
+ it "single right quotes at the end" do
36
+ expect(t.process(%{foo'})).to eq(%{foo\u2019})
37
+ end
38
+
39
+ it "single quotes in the middle" do
40
+ expect(t.process(%{a 'foo' bar})).to eq(%{a \u2018foo\u2019 bar})
41
+ end
42
+
43
+ it "handles apostraphes" do
44
+ expect(t.process(%{can't})).to eq(%{can\u2019t})
45
+ end
46
+
47
+ it "single quotes inside double quotes" do
48
+ expect(t.process(%{"'I can't do that', he said"})).to eq(%{\u201C\u2018I can\u2019t do that\u2019, he said\u201D})
49
+ end
50
+
51
+ it "replaces the straightforward ones" do
52
+ expect(t.process(%{``hi...'' -- ---})).to eq(%{\u201Chi\u2026\u201D \u2013 \u2014})
53
+ end
54
+
55
+ it "does nothing on lone quotes" do
56
+ expect(t.process(%{"})).to eq(%{"})
57
+ expect(t.process(%{'})).to eq(%{'})
58
+ end
59
+
60
+ it "ignores stuff in <tags>" do
61
+ expect(t.process(%{<span weight="bold">"can't"</span>})).to eq(%{<span weight="bold">\u201Ccan\u2019t\u201D</span>})
62
+ end
63
+
64
+
65
+ context 'configured' do
66
+ #TODO
67
+ end
68
+
69
+
70
+
71
+ end
@@ -17,8 +17,7 @@ cairo: save([])
17
17
  cairo: set_source_color([:black])
18
18
  cairo: translate([65, 400])
19
19
  cairo: rotate([0])
20
- cairo: translate([-65, -400])
21
- cairo: move_to([65, 400])
20
+ cairo: move_to([0, 0])
22
21
  pango font: size=([128000])
23
22
  pango: font_description=([MockDouble])
24
23
  pango: text=(["ShortBig"])
@@ -29,9 +28,10 @@ pango: alignment=([#<Pango::Layout::Alignment center>])
29
28
  pango: justify=([false])
30
29
  pango: spacing=([0])
31
30
  cairo: update_pango_layout([MockDouble])
31
+ cairo: move_to([0, 0])
32
32
  cairo: update_pango_layout([MockDouble])
33
33
  cairo: show_pango_layout([MockDouble])
34
- cairo: rounded_rectangle([65, 400, 0, 0, 0, 0])
34
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
35
35
  cairo: set_source_color([:red])
36
36
  cairo: set_line_width([2.0])
37
37
  cairo: stroke([])
@@ -40,8 +40,7 @@ cairo: save([])
40
40
  cairo: set_source_color([:black])
41
41
  cairo: translate([65, 400])
42
42
  cairo: rotate([0])
43
- cairo: translate([-65, -400])
44
- cairo: move_to([65, 400])
43
+ cairo: move_to([0, 0])
45
44
  pango font: size=([46080])
46
45
  pango: font_description=([MockDouble])
47
46
  pango: text=(["Medium_Length_Name"])
@@ -52,9 +51,10 @@ pango: alignment=([#<Pango::Layout::Alignment center>])
52
51
  pango: justify=([false])
53
52
  pango: spacing=([0])
54
53
  cairo: update_pango_layout([MockDouble])
54
+ cairo: move_to([0, 0])
55
55
  cairo: update_pango_layout([MockDouble])
56
56
  cairo: show_pango_layout([MockDouble])
57
- cairo: rounded_rectangle([65, 400, 0, 0, 0, 0])
57
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
58
58
  cairo: set_source_color([:red])
59
59
  cairo: set_line_width([2.0])
60
60
  cairo: stroke([])
@@ -63,8 +63,7 @@ cairo: save([])
63
63
  cairo: set_source_color([:black])
64
64
  cairo: translate([65, 400])
65
65
  cairo: rotate([0])
66
- cairo: translate([-65, -400])
67
- cairo: move_to([65, 400])
66
+ cairo: move_to([0, 0])
68
67
  pango font: size=([36864])
69
68
  pango: font_description=([MockDouble])
70
69
  pango: text=(["Super_Duper_Long_Name"])
@@ -75,9 +74,10 @@ pango: alignment=([#<Pango::Layout::Alignment center>])
75
74
  pango: justify=([false])
76
75
  pango: spacing=([0])
77
76
  cairo: update_pango_layout([MockDouble])
77
+ cairo: move_to([0, 0])
78
78
  cairo: update_pango_layout([MockDouble])
79
79
  cairo: show_pango_layout([MockDouble])
80
- cairo: rounded_rectangle([65, 400, 0, 0, 0, 0])
80
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
81
81
  cairo: set_source_color([:red])
82
82
  cairo: set_line_width([2.0])
83
83
  cairo: stroke([])
@@ -71,8 +71,7 @@ cairo: save([])
71
71
  cairo: set_source_color([:black])
72
72
  cairo: translate([220, 78])
73
73
  cairo: rotate([0])
74
- cairo: translate([-220, -78])
75
- cairo: move_to([220, 78])
74
+ cairo: move_to([0, 0])
76
75
  pango: font_description=([MockDouble])
77
76
  pango: text=(["Thief"])
78
77
  pango: wrap=([#<Pango::Layout::WrapMode word-char>])
@@ -81,6 +80,7 @@ pango: alignment=([#<Pango::Layout::Alignment left>])
81
80
  pango: justify=([false])
82
81
  pango: spacing=([0])
83
82
  cairo: update_pango_layout([MockDouble])
83
+ cairo: move_to([0, 0])
84
84
  cairo: update_pango_layout([MockDouble])
85
85
  cairo: show_pango_layout([MockDouble])
86
86
  cairo: restore([])
@@ -88,8 +88,7 @@ cairo: save([])
88
88
  cairo: set_source_color([:black])
89
89
  cairo: translate([220, 78])
90
90
  cairo: rotate([0])
91
- cairo: translate([-220, -78])
92
- cairo: move_to([220, 78])
91
+ cairo: move_to([0, 0])
93
92
  pango: font_description=([MockDouble])
94
93
  pango: text=(["Grifter"])
95
94
  pango: wrap=([#<Pango::Layout::WrapMode word-char>])
@@ -98,6 +97,7 @@ pango: alignment=([#<Pango::Layout::Alignment left>])
98
97
  pango: justify=([false])
99
98
  pango: spacing=([0])
100
99
  cairo: update_pango_layout([MockDouble])
100
+ cairo: move_to([0, 0])
101
101
  cairo: update_pango_layout([MockDouble])
102
102
  cairo: show_pango_layout([MockDouble])
103
103
  cairo: restore([])
@@ -105,8 +105,7 @@ cairo: save([])
105
105
  cairo: set_source_color([:black])
106
106
  cairo: translate([220, 78])
107
107
  cairo: rotate([0])
108
- cairo: translate([-220, -78])
109
- cairo: move_to([220, 78])
108
+ cairo: move_to([0, 0])
110
109
  pango: font_description=([MockDouble])
111
110
  pango: text=(["Mastermind"])
112
111
  pango: wrap=([#<Pango::Layout::WrapMode word-char>])
@@ -115,6 +114,7 @@ pango: alignment=([#<Pango::Layout::Alignment left>])
115
114
  pango: justify=([false])
116
115
  pango: spacing=([0])
117
116
  cairo: update_pango_layout([MockDouble])
117
+ cairo: move_to([0, 0])
118
118
  cairo: update_pango_layout([MockDouble])
119
119
  cairo: show_pango_layout([MockDouble])
120
120
  cairo: restore([])
@@ -122,8 +122,7 @@ cairo: save([])
122
122
  cairo: set_source_color([:black])
123
123
  cairo: translate([75, 85])
124
124
  cairo: rotate([0])
125
- cairo: translate([-75, -85])
126
- cairo: move_to([75, 85])
125
+ cairo: move_to([0, 0])
127
126
  pango: font_description=([MockDouble])
128
127
  pango: text=(["1"])
129
128
  pango: width=([131072])
@@ -133,6 +132,7 @@ pango: alignment=([#<Pango::Layout::Alignment center>])
133
132
  pango: justify=([false])
134
133
  pango: spacing=([0])
135
134
  cairo: update_pango_layout([MockDouble])
135
+ cairo: move_to([0, 0])
136
136
  cairo: update_pango_layout([MockDouble])
137
137
  cairo: show_pango_layout([MockDouble])
138
138
  cairo: restore([])
@@ -140,8 +140,7 @@ cairo: save([])
140
140
  cairo: set_source_color([:black])
141
141
  cairo: translate([75, 85])
142
142
  cairo: rotate([0])
143
- cairo: translate([-75, -85])
144
- cairo: move_to([75, 85])
143
+ cairo: move_to([0, 0])
145
144
  pango: font_description=([MockDouble])
146
145
  pango: text=(["2"])
147
146
  pango: width=([131072])
@@ -151,6 +150,7 @@ pango: alignment=([#<Pango::Layout::Alignment center>])
151
150
  pango: justify=([false])
152
151
  pango: spacing=([0])
153
152
  cairo: update_pango_layout([MockDouble])
153
+ cairo: move_to([0, 0])
154
154
  cairo: update_pango_layout([MockDouble])
155
155
  cairo: show_pango_layout([MockDouble])
156
156
  cairo: restore([])
@@ -158,8 +158,7 @@ cairo: save([])
158
158
  cairo: set_source_color([:black])
159
159
  cairo: translate([75, 85])
160
160
  cairo: rotate([0])
161
- cairo: translate([-75, -85])
162
- cairo: move_to([75, 85])
161
+ cairo: move_to([0, 0])
163
162
  pango: font_description=([MockDouble])
164
163
  pango: text=(["3"])
165
164
  pango: width=([131072])
@@ -169,6 +168,7 @@ pango: alignment=([#<Pango::Layout::Alignment center>])
169
168
  pango: justify=([false])
170
169
  pango: spacing=([0])
171
170
  cairo: update_pango_layout([MockDouble])
171
+ cairo: move_to([0, 0])
172
172
  cairo: update_pango_layout([MockDouble])
173
173
  cairo: show_pango_layout([MockDouble])
174
174
  cairo: restore([])