squib 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.gitmodules +22 -0
- data/.travis.yml +4 -5
- data/CHANGELOG.md +23 -0
- data/CONTRIBUTING.md +40 -0
- data/README.md +25 -553
- data/RELEASE TODO.md +2 -2
- data/Rakefile +6 -64
- data/appveyor.yml +0 -4
- data/benchmarks/antialias_best.rb +2 -2
- data/benchmarks/antialias_fast.rb +2 -2
- data/benchmarks/{backend-memory.rb → backend_memory.rb} +2 -2
- data/benchmarks/{backend-svg.rb → backend_svg.rb} +2 -2
- data/benchmarks/tons_of_png.rb +1 -1
- data/benchmarks/tons_of_svg.rb +1 -1
- data/benchmarks/tons_of_text.rb +1 -1
- data/docs/Makefile +216 -0
- data/docs/_static/css/squibdocs.css +18 -0
- data/docs/args/draw.rst +36 -0
- data/docs/args/expansion.rst +3 -0
- data/docs/args/layout.rst +6 -0
- data/docs/args/output_dir.rst +6 -0
- data/docs/args/range.rst +6 -0
- data/docs/args/transform.rst +51 -0
- data/docs/args/trim.rst +11 -0
- data/docs/args/wh.rst +12 -0
- data/docs/args/xy.rst +12 -0
- data/docs/arrays.rst +77 -0
- data/docs/backends.rst +20 -0
- data/docs/bleed.rst +13 -0
- data/docs/build_groups.rst +47 -0
- data/docs/colors.rst +64 -0
- data/docs/conf.py +287 -0
- data/docs/config.rst +117 -0
- data/docs/data.rst +22 -0
- data/docs/dsl/background.rst +20 -0
- data/docs/dsl/build.rst +32 -0
- data/docs/dsl/build_groups.rst +23 -0
- data/docs/dsl/circle.rst +27 -0
- data/docs/dsl/cm.rst +19 -0
- data/docs/dsl/csv.rst +62 -0
- data/docs/dsl/curve.rst +63 -0
- data/docs/dsl/deck.rst +45 -0
- data/docs/dsl/disable_build.rst +28 -0
- data/docs/dsl/ellipse.rst +17 -0
- data/docs/dsl/enable_build.rst +25 -0
- data/docs/dsl/grid.rst +31 -0
- data/docs/dsl/hand.rst +40 -0
- data/docs/dsl/hint.rst +15 -0
- data/docs/dsl/inches.rst +19 -0
- data/docs/dsl/index.rst +9 -0
- data/docs/dsl/line.rst +52 -0
- data/docs/dsl/png.rst +49 -0
- data/docs/dsl/polygon.rst +28 -0
- data/docs/dsl/rect.rst +18 -0
- data/docs/dsl/save.rst +23 -0
- data/docs/dsl/save_pdf.rst +48 -0
- data/docs/dsl/save_png.rst +46 -0
- data/docs/dsl/save_sheet.rst +55 -0
- data/docs/dsl/showcase.rst +65 -0
- data/docs/dsl/star.rst +35 -0
- data/docs/dsl/svg.rst +119 -0
- data/docs/dsl/text.rst +294 -0
- data/docs/dsl/triangle.rst +38 -0
- data/docs/dsl/use_layout.rst +16 -0
- data/docs/dsl/xlsx.rst +50 -0
- data/docs/guides/game_icons.rst +2 -0
- data/docs/guides/getting-started/index.rst +5 -0
- data/docs/guides/getting-started/part_0_learning_ruby.rst +145 -0
- data/docs/guides/getting-started/part_1_zero_to_game.rst +216 -0
- data/docs/guides/getting-started/part_2_iconography.rst +152 -0
- data/docs/guides/getting-started/part_3_workflows.rst +4 -0
- data/docs/guides/git.rst +13 -0
- data/docs/guides/hello_world.rst +6 -0
- data/docs/help.rst +157 -0
- data/docs/index.rst +35 -0
- data/docs/install.rst +66 -0
- data/docs/layouts.rst +235 -0
- data/docs/learning.rst +10 -0
- data/docs/make.bat +263 -0
- data/docs/parameters.rst +26 -0
- data/docs/server.bat +1 -0
- data/docs/text_feature.rst +86 -0
- data/docs/units.rst +6 -0
- data/lib/squib.rb +4 -4
- data/lib/squib/api/background.rb +5 -10
- data/lib/squib/api/data.rb +30 -54
- data/lib/squib/api/groups.rb +47 -0
- data/lib/squib/api/image.rb +8 -67
- data/lib/squib/api/save.rb +15 -105
- data/lib/squib/api/settings.rb +8 -22
- data/lib/squib/api/shapes.rb +15 -185
- data/lib/squib/api/text.rb +9 -49
- data/lib/squib/api/text_embed.rb +12 -12
- data/lib/squib/api/units.rb +3 -17
- data/lib/squib/args/arg_loader.rb +6 -6
- data/lib/squib/args/box.rb +2 -2
- data/lib/squib/args/card_range.rb +1 -1
- data/lib/squib/args/color_validator.rb +2 -2
- data/lib/squib/args/coords.rb +2 -2
- data/lib/squib/args/csv_opts.rb +25 -0
- data/lib/squib/args/dir_validator.rb +1 -1
- data/lib/squib/args/draw.rb +2 -2
- data/lib/squib/args/embed_adjust.rb +1 -1
- data/lib/squib/args/embed_key.rb +1 -1
- data/lib/squib/args/hand_special.rb +37 -37
- data/lib/squib/args/import.rb +2 -2
- data/lib/squib/args/input_file.rb +1 -1
- data/lib/squib/args/paint.rb +3 -3
- data/lib/squib/args/paragraph.rb +2 -2
- data/lib/squib/args/save_batch.rb +2 -2
- data/lib/squib/args/scale_box.rb +1 -1
- data/lib/squib/args/sheet.rb +3 -3
- data/lib/squib/args/showcase_special.rb +2 -2
- data/lib/squib/args/svg_special.rb +1 -1
- data/lib/squib/args/transform.rb +2 -2
- data/lib/squib/args/typographer.rb +5 -4
- data/lib/squib/args/unit_conversion.rb +4 -4
- data/lib/squib/card.rb +8 -8
- data/lib/squib/conf.rb +5 -5
- data/lib/squib/deck.rb +20 -18
- data/lib/squib/graphics/cairo_context_wrapper.rb +3 -3
- data/lib/squib/graphics/gradient_regex.rb +1 -1
- data/lib/squib/graphics/hand.rb +2 -2
- data/lib/squib/graphics/save_doc.rb +9 -8
- data/lib/squib/graphics/save_images.rb +24 -11
- data/lib/squib/graphics/shapes.rb +16 -17
- data/lib/squib/graphics/showcase.rb +9 -9
- data/lib/squib/graphics/text.rb +21 -21
- data/lib/squib/layout_parser.rb +9 -9
- data/lib/squib/layouts/economy.yml +85 -85
- data/lib/squib/layouts/fantasy.yml +101 -101
- data/lib/squib/layouts/hand.yml +62 -62
- data/lib/squib/layouts/playing-card.yml +35 -35
- data/lib/squib/layouts/tuck_box.yml +45 -45
- data/lib/squib/sample_helpers.rb +1 -1
- data/lib/squib/version.rb +1 -1
- data/samples/{backend.rb → backend/_backend.rb} +2 -2
- data/samples/basic.rb +3 -3
- data/samples/bug134.rb +14 -0
- data/samples/build_groups/build_groups.rb +36 -0
- data/samples/cairo_access.rb +12 -1
- data/samples/{colors.rb → colors/_colors.rb} +12 -12
- data/samples/{gradients.rb → colors/_gradients.rb} +1 -1
- data/samples/config_text_markup.rb +2 -2
- data/samples/custom-config.yml +5 -5
- data/samples/custom_config.rb +18 -18
- data/samples/{csv_import.rb → data/_csv.rb} +8 -1
- data/samples/{excel.rb → data/_excel.rb} +3 -3
- data/samples/embed_text.rb +21 -0
- data/samples/hello_world.rb +1 -1
- data/samples/{load_images.rb → images/_more_load_images.rb} +2 -2
- data/samples/layouts.rb +11 -1
- data/samples/layouts_builtin.rb +51 -51
- data/samples/offset.svg +71 -71
- data/samples/ranges.rb +7 -7
- data/samples/{hand.rb → saves/_hand.rb} +1 -2
- data/samples/{portrait-landscape.rb → saves/_portrait_landscape.rb} +4 -4
- data/samples/{saves.rb → saves/_saves.rb} +0 -0
- data/samples/{showcase.rb → saves/_showcase.rb} +2 -2
- data/samples/{draw_shapes.rb → shapes/_draw_shapes.rb} +1 -1
- data/samples/text/_text.rb +4 -3
- data/samples/text_options.rb +6 -6
- data/samples/unicode.rb +1 -1
- data/spec/api/api_data_spec.rb +59 -4
- data/spec/api/api_settings_spec.rb +1 -1
- data/spec/args/box_spec.rb +7 -7
- data/spec/args/draw_spec.rb +19 -19
- data/spec/args/embed_key_spec.rb +13 -13
- data/spec/args/input_file_spec.rb +2 -2
- data/spec/args/paint_spec.rb +5 -5
- data/spec/args/paragraph_spec.rb +28 -28
- data/spec/args/range_spec.rb +1 -1
- data/spec/args/save_batch_spec.rb +10 -10
- data/spec/args/scale_box_spec.rb +9 -9
- data/spec/args/sheet_spec.rb +8 -8
- data/spec/args/showcase_special_spec.rb +15 -15
- data/spec/args/transform_spec.rb +4 -4
- data/spec/args/typographer_spec.rb +11 -11
- data/spec/args/unit_conversion_spec.rb +2 -2
- data/spec/card_spec.rb +1 -1
- data/spec/commands/new_spec.rb +1 -1
- data/spec/data/csv/custom_opts.csv +2 -0
- data/spec/data/csv/newline.csv +3 -0
- data/spec/data/csv/qty.csv +2 -2
- data/spec/data/csv/qty_named.csv +2 -2
- data/spec/data/csv/with_spaces.csv +2 -2
- data/spec/data/csv/yield.csv +3 -0
- data/spec/data/samples/{autoscale_font.rb.txt → autoscale_font/_autoscale_font.rb.txt} +55 -18
- data/spec/data/samples/cairo_access.rb.txt +24 -0
- data/spec/data/samples/{gradients.rb.txt → colors/_gradients.rb.txt} +0 -0
- data/spec/data/samples/config_text_markup.rb.txt +72 -72
- data/spec/data/samples/custom_config.rb.txt +1 -0
- data/spec/data/samples/{csv_import.rb.txt → data/_csv.rb.txt} +0 -0
- data/spec/data/samples/{excel.rb.txt → data/_excel.rb.txt} +0 -0
- data/spec/data/samples/embed_text.rb.txt +79 -0
- data/spec/data/samples/hello_world.rb.txt +36 -36
- data/spec/data/samples/{load_images.rb.txt → images/_more_load_images.rb.txt} +4 -4
- data/spec/data/samples/{hand.rb.txt → saves/_hand.rb.txt} +0 -0
- data/spec/data/samples/{portrait-landscape.rb.txt → saves/_portrait_landscape.rb.txt} +11 -7
- data/spec/data/samples/{save_pdf.rb.txt → saves/_save_pdf.rb.txt} +0 -0
- data/spec/data/samples/{saves.rb.txt → saves/_saves.rb.txt} +3 -4
- data/spec/data/samples/{showcase.rb.txt → saves/_showcase.rb.txt} +0 -0
- data/spec/data/samples/{draw_shapes.rb.txt → shapes/_draw_shapes.rb.txt} +0 -0
- data/spec/data/samples/text_options.rb.txt +1125 -1125
- data/spec/graphics/cairo_context_wrapper_spec.rb +10 -10
- data/spec/graphics/graphics_save_doc_spec.rb +11 -5
- data/spec/layout_parser_spec.rb +21 -9
- data/spec/logger_spec.rb +2 -2
- data/spec/samples/run_samples_spec.rb +1 -1
- data/spec/samples/samples_regression_spec.rb +16 -18
- data/spec/samples/sanity.rb +9 -9
- data/spec/sanity/.gitignore +1 -0
- data/spec/sanity/sanity.html.erb +42 -0
- data/spec/sanity/sanity_test.rb +42 -0
- data/spec/sanity/tests.yml +12 -0
- data/spec/spec_helper.rb +22 -20
- data/squib.gemspec +3 -4
- metadata +143 -81
- data/.rspec +0 -1
- data/.yardopts +0 -10
- data/samples/autoscale_font.rb +0 -27
- data/samples/backend-config.yml +0 -5
- data/samples/color_shortcuts.rb +0 -6
- data/samples/explode_quantities.xlsx +0 -0
- data/samples/quantity_explosion.csv +0 -3
- data/samples/sample.csv +0 -3
- data/samples/sample.xlsx +0 -0
- data/squib.sublime-project +0 -42
data/RELEASE TODO.md
CHANGED
@@ -3,16 +3,16 @@ Be sure to remember to do the following for releases. (Copy into a GitHub issue)
|
|
3
3
|
- [ ] CHANGELOG is written for all new changes
|
4
4
|
- [ ] README is updated
|
5
5
|
- [ ] Samples are updated
|
6
|
-
- [ ] `rake doc`
|
7
6
|
- [ ] Check `sample_regression_spec.rb` regression tests are all enabled (i.e. `overwrite_sample` is commented out)
|
8
7
|
- [ ] Bump version.rb
|
9
8
|
- [ ] Do a full rake locally
|
10
9
|
- [ ] `rake sanity`, and check visually
|
11
10
|
- [ ] Travis is passing on dev branch
|
12
11
|
- [ ] Merge master branch
|
12
|
+
- [ ] Push master branch
|
13
13
|
- [ ] Create GitHub release tag
|
14
14
|
- [ ] `gem push pkg/squib-x.y.z.gem`
|
15
15
|
- [ ] Github milestone closed
|
16
|
-
- [ ]
|
16
|
+
- [ ] Activate version on squib.readthedocs.org
|
17
17
|
- [ ] Bump version.rb to the next alpha
|
18
18
|
- [ ] Publish on BoardGameGeek thread
|
data/Rakefile
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
2
|
require 'rspec/core/rake_task'
|
3
|
-
require 'yard'
|
4
3
|
require 'benchmark'
|
5
4
|
# require 'byebug'
|
6
5
|
|
@@ -10,34 +9,25 @@ task default: [:install, :spec]
|
|
10
9
|
# Useful for hooking up with SublimeText.
|
11
10
|
# e.g. rake sample[basic.rb]
|
12
11
|
desc 'Run a specific sample'
|
13
|
-
task :run,[:file] => :install do |t, args|
|
12
|
+
task :run, [:file] => :install do |t, args|
|
14
13
|
args.with_defaults(file: 'basic.rb')
|
15
14
|
Dir.chdir('samples') do
|
16
|
-
args[:file]
|
15
|
+
args[:file] << '.rb' unless args[:file].end_with? '.rb'
|
17
16
|
puts "Running samples/#{args[:file]}"
|
18
17
|
load args[:file]
|
19
18
|
end
|
20
19
|
end
|
21
20
|
|
22
|
-
|
23
21
|
RSpec::Core::RakeTask.new(:spec)
|
24
22
|
|
25
23
|
RSpec::Core::RakeTask.new(:spec_fastonly) do |t|
|
26
|
-
t.rspec_opts =
|
27
|
-
end
|
28
|
-
|
29
|
-
desc 'Build API docs'
|
30
|
-
task doc: [:yarddoc, :apply_google_analytics]
|
31
|
-
|
32
|
-
YARD::Rake::YardocTask.new(:yarddoc) do |t|
|
33
|
-
t.files = ['lib/**/*.rb', 'samples/**/*.rb'] # optional
|
34
|
-
#t.options = ['--any', '--extra', '--opts'] # optional
|
24
|
+
t.rspec_opts = '--tag ~slow'
|
35
25
|
end
|
36
26
|
|
37
27
|
desc 'Run some performance benchmarks'
|
38
28
|
task benchmark: [:install] do
|
39
29
|
require 'squib'
|
40
|
-
Squib::logger.level = Logger::ERROR #silence warnings
|
30
|
+
Squib::logger.level = Logger::ERROR # silence warnings
|
41
31
|
Dir.chdir('benchmarks') do
|
42
32
|
Benchmark.bm(15) do |bm|
|
43
33
|
Dir['*.rb'].each do | script |
|
@@ -50,57 +40,9 @@ end
|
|
50
40
|
|
51
41
|
desc 'Run sanity tests without a full rebuild'
|
52
42
|
task :sanity_only do
|
53
|
-
require_relative 'spec/
|
54
|
-
|
43
|
+
require_relative 'spec/sanity/sanity_test.rb'
|
44
|
+
SanityTest.new.run
|
55
45
|
end
|
56
46
|
|
57
47
|
desc 'Run full rebuild with sanity tests'
|
58
48
|
task sanity: [:install, :spec, :sanity_only]
|
59
|
-
|
60
|
-
desc 'Insert Google Analytics into documentation build'
|
61
|
-
task :apply_google_analytics do
|
62
|
-
# The string to replace in the html document. This is chosen to be the end
|
63
|
-
# body </body> tag. So the script can be injected as the last thing in the
|
64
|
-
# document body.
|
65
|
-
string_to_replace = "</body>"
|
66
|
-
# This is the string to replace with. It include the google analytics script
|
67
|
-
# as well as the end </body> tag.
|
68
|
-
string_to_replace_with = <<-EOF
|
69
|
-
<script>
|
70
|
-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
71
|
-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
72
|
-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
73
|
-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
74
|
-
|
75
|
-
ga('create', 'UA-54811605-1', 'auto');
|
76
|
-
ga('send', 'pageview');
|
77
|
-
|
78
|
-
</script>
|
79
|
-
</body>
|
80
|
-
EOF
|
81
|
-
|
82
|
-
files = Dir.glob("doc/**/*.html")
|
83
|
-
|
84
|
-
files.each do |html_file|
|
85
|
-
puts "Processing file: #{html_file}"
|
86
|
-
contents = ""
|
87
|
-
# Read the file contents
|
88
|
-
file = File.open(html_file)
|
89
|
-
file.each { |line| contents << line }
|
90
|
-
file.close
|
91
|
-
|
92
|
-
# If the file already has google analytics tracking info, skip it.
|
93
|
-
if contents.include?(string_to_replace_with)
|
94
|
-
puts "Skipped..."
|
95
|
-
next
|
96
|
-
end
|
97
|
-
|
98
|
-
# Apply google analytics tracking info to the html file
|
99
|
-
contents.gsub!(string_to_replace, string_to_replace_with)
|
100
|
-
|
101
|
-
# Write the contents with the google analytics info to the file
|
102
|
-
file = File.open(html_file, "w")
|
103
|
-
file.write(contents)
|
104
|
-
file.close
|
105
|
-
end
|
106
|
-
end
|
data/appveyor.yml
CHANGED
@@ -2,7 +2,7 @@ require 'squib'
|
|
2
2
|
|
3
3
|
Squib::Deck.new(cards: 200) do
|
4
4
|
background color: :white
|
5
|
-
text str:
|
5
|
+
text str: 'Hello, world!', y: 500, width: 825, font: 'Sans bold 72', align: :center
|
6
6
|
rect x: 10, y: 10, width: 20, height: 20
|
7
7
|
circle x: 40, y: 40, radius: 25
|
8
8
|
triangle x1: 50, y1: 15, x2: 60, y2: 25, x3: 75, y3: 25
|
@@ -11,4 +11,4 @@ Squib::Deck.new(cards: 200) do
|
|
11
11
|
png file: 'shiny-purse.png', x: 250, y: 20
|
12
12
|
save_png prefix: 'rasterized_'
|
13
13
|
save_pdf file: 'backend.pdf'
|
14
|
-
end
|
14
|
+
end
|
@@ -2,7 +2,7 @@ require 'squib'
|
|
2
2
|
|
3
3
|
Squib::Deck.new(cards: 200, config: 'backend-svg.yml') do
|
4
4
|
background color: :white
|
5
|
-
text str:
|
5
|
+
text str: 'Hello, world!', y: 500, width: 825, font: 'Sans bold 72', align: :center
|
6
6
|
rect x: 10, y: 10, width: 20, height: 20
|
7
7
|
circle x: 40, y: 40, radius: 25
|
8
8
|
triangle x1: 50, y1: 15, x2: 60, y2: 25, x3: 75, y3: 25
|
@@ -11,4 +11,4 @@ Squib::Deck.new(cards: 200, config: 'backend-svg.yml') do
|
|
11
11
|
png file: 'shiny-purse.png', x: 250, y: 20
|
12
12
|
save_png prefix: 'rasterized_'
|
13
13
|
save_pdf file: 'backend.pdf'
|
14
|
-
end
|
14
|
+
end
|
data/benchmarks/tons_of_png.rb
CHANGED
data/benchmarks/tons_of_svg.rb
CHANGED
data/benchmarks/tons_of_text.rb
CHANGED
data/docs/Makefile
ADDED
@@ -0,0 +1,216 @@
|
|
1
|
+
# Makefile for Sphinx documentation
|
2
|
+
#
|
3
|
+
|
4
|
+
# You can set these variables from the command line.
|
5
|
+
SPHINXOPTS =
|
6
|
+
SPHINXBUILD = sphinx-build
|
7
|
+
PAPER =
|
8
|
+
BUILDDIR = _build
|
9
|
+
|
10
|
+
# User-friendly check for sphinx-build
|
11
|
+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
12
|
+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
13
|
+
endif
|
14
|
+
|
15
|
+
# Internal variables.
|
16
|
+
PAPEROPT_a4 = -D latex_paper_size=a4
|
17
|
+
PAPEROPT_letter = -D latex_paper_size=letter
|
18
|
+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
19
|
+
# the i18n builder cannot share the environment and doctrees with the others
|
20
|
+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
21
|
+
|
22
|
+
.PHONY: help
|
23
|
+
help:
|
24
|
+
@echo "Please use \`make <target>' where <target> is one of"
|
25
|
+
@echo " html to make standalone HTML files"
|
26
|
+
@echo " dirhtml to make HTML files named index.html in directories"
|
27
|
+
@echo " singlehtml to make a single large HTML file"
|
28
|
+
@echo " pickle to make pickle files"
|
29
|
+
@echo " json to make JSON files"
|
30
|
+
@echo " htmlhelp to make HTML files and a HTML help project"
|
31
|
+
@echo " qthelp to make HTML files and a qthelp project"
|
32
|
+
@echo " applehelp to make an Apple Help Book"
|
33
|
+
@echo " devhelp to make HTML files and a Devhelp project"
|
34
|
+
@echo " epub to make an epub"
|
35
|
+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
36
|
+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
37
|
+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
38
|
+
@echo " text to make text files"
|
39
|
+
@echo " man to make manual pages"
|
40
|
+
@echo " texinfo to make Texinfo files"
|
41
|
+
@echo " info to make Texinfo files and run them through makeinfo"
|
42
|
+
@echo " gettext to make PO message catalogs"
|
43
|
+
@echo " changes to make an overview of all changed/added/deprecated items"
|
44
|
+
@echo " xml to make Docutils-native XML files"
|
45
|
+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
46
|
+
@echo " linkcheck to check all external links for integrity"
|
47
|
+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
48
|
+
@echo " coverage to run coverage check of the documentation (if enabled)"
|
49
|
+
|
50
|
+
.PHONY: clean
|
51
|
+
clean:
|
52
|
+
rm -rf $(BUILDDIR)/*
|
53
|
+
|
54
|
+
.PHONY: html
|
55
|
+
html:
|
56
|
+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
57
|
+
@echo
|
58
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
59
|
+
|
60
|
+
.PHONY: dirhtml
|
61
|
+
dirhtml:
|
62
|
+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
63
|
+
@echo
|
64
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
65
|
+
|
66
|
+
.PHONY: singlehtml
|
67
|
+
singlehtml:
|
68
|
+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
69
|
+
@echo
|
70
|
+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
71
|
+
|
72
|
+
.PHONY: pickle
|
73
|
+
pickle:
|
74
|
+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
75
|
+
@echo
|
76
|
+
@echo "Build finished; now you can process the pickle files."
|
77
|
+
|
78
|
+
.PHONY: json
|
79
|
+
json:
|
80
|
+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
81
|
+
@echo
|
82
|
+
@echo "Build finished; now you can process the JSON files."
|
83
|
+
|
84
|
+
.PHONY: htmlhelp
|
85
|
+
htmlhelp:
|
86
|
+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
87
|
+
@echo
|
88
|
+
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
89
|
+
".hhp project file in $(BUILDDIR)/htmlhelp."
|
90
|
+
|
91
|
+
.PHONY: qthelp
|
92
|
+
qthelp:
|
93
|
+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
94
|
+
@echo
|
95
|
+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
96
|
+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
97
|
+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Squib.qhcp"
|
98
|
+
@echo "To view the help file:"
|
99
|
+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Squib.qhc"
|
100
|
+
|
101
|
+
.PHONY: applehelp
|
102
|
+
applehelp:
|
103
|
+
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
104
|
+
@echo
|
105
|
+
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
106
|
+
@echo "N.B. You won't be able to view it unless you put it in" \
|
107
|
+
"~/Library/Documentation/Help or install it in your application" \
|
108
|
+
"bundle."
|
109
|
+
|
110
|
+
.PHONY: devhelp
|
111
|
+
devhelp:
|
112
|
+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
113
|
+
@echo
|
114
|
+
@echo "Build finished."
|
115
|
+
@echo "To view the help file:"
|
116
|
+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Squib"
|
117
|
+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Squib"
|
118
|
+
@echo "# devhelp"
|
119
|
+
|
120
|
+
.PHONY: epub
|
121
|
+
epub:
|
122
|
+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
123
|
+
@echo
|
124
|
+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
125
|
+
|
126
|
+
.PHONY: latex
|
127
|
+
latex:
|
128
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
129
|
+
@echo
|
130
|
+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
131
|
+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
132
|
+
"(use \`make latexpdf' here to do that automatically)."
|
133
|
+
|
134
|
+
.PHONY: latexpdf
|
135
|
+
latexpdf:
|
136
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
137
|
+
@echo "Running LaTeX files through pdflatex..."
|
138
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
139
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
140
|
+
|
141
|
+
.PHONY: latexpdfja
|
142
|
+
latexpdfja:
|
143
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
144
|
+
@echo "Running LaTeX files through platex and dvipdfmx..."
|
145
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
146
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
147
|
+
|
148
|
+
.PHONY: text
|
149
|
+
text:
|
150
|
+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
151
|
+
@echo
|
152
|
+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
153
|
+
|
154
|
+
.PHONY: man
|
155
|
+
man:
|
156
|
+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
157
|
+
@echo
|
158
|
+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
159
|
+
|
160
|
+
.PHONY: texinfo
|
161
|
+
texinfo:
|
162
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
163
|
+
@echo
|
164
|
+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
165
|
+
@echo "Run \`make' in that directory to run these through makeinfo" \
|
166
|
+
"(use \`make info' here to do that automatically)."
|
167
|
+
|
168
|
+
.PHONY: info
|
169
|
+
info:
|
170
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
171
|
+
@echo "Running Texinfo files through makeinfo..."
|
172
|
+
make -C $(BUILDDIR)/texinfo info
|
173
|
+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
174
|
+
|
175
|
+
.PHONY: gettext
|
176
|
+
gettext:
|
177
|
+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
178
|
+
@echo
|
179
|
+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
180
|
+
|
181
|
+
.PHONY: changes
|
182
|
+
changes:
|
183
|
+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
184
|
+
@echo
|
185
|
+
@echo "The overview file is in $(BUILDDIR)/changes."
|
186
|
+
|
187
|
+
.PHONY: linkcheck
|
188
|
+
linkcheck:
|
189
|
+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
190
|
+
@echo
|
191
|
+
@echo "Link check complete; look for any errors in the above output " \
|
192
|
+
"or in $(BUILDDIR)/linkcheck/output.txt."
|
193
|
+
|
194
|
+
.PHONY: doctest
|
195
|
+
doctest:
|
196
|
+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
197
|
+
@echo "Testing of doctests in the sources finished, look at the " \
|
198
|
+
"results in $(BUILDDIR)/doctest/output.txt."
|
199
|
+
|
200
|
+
.PHONY: coverage
|
201
|
+
coverage:
|
202
|
+
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
203
|
+
@echo "Testing of coverage in the sources finished, look at the " \
|
204
|
+
"results in $(BUILDDIR)/coverage/python.txt."
|
205
|
+
|
206
|
+
.PHONY: xml
|
207
|
+
xml:
|
208
|
+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
209
|
+
@echo
|
210
|
+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
211
|
+
|
212
|
+
.PHONY: pseudoxml
|
213
|
+
pseudoxml:
|
214
|
+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
215
|
+
@echo
|
216
|
+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
data/docs/args/draw.rst
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
.. :orphan:
|
2
|
+
|
3
|
+
fill_color
|
4
|
+
default: ``'#0000'`` (fully transparent)
|
5
|
+
|
6
|
+
the color or gradient to fill with. See :doc:`/colors`.
|
7
|
+
|
8
|
+
|
9
|
+
stroke_color
|
10
|
+
default: ``:black``
|
11
|
+
|
12
|
+
the color with which to stroke the outside of the shape. See :doc:`/colors`.
|
13
|
+
|
14
|
+
|
15
|
+
stroke_width
|
16
|
+
default: ``2``
|
17
|
+
|
18
|
+
the width of the outside stroke. Supports :doc:`/units`.
|
19
|
+
|
20
|
+
|
21
|
+
stroke_strategy
|
22
|
+
default: ``:fill_first``
|
23
|
+
|
24
|
+
Specify whether the stroke is done before (thinner) or after (thicker) filling the shape.
|
25
|
+
|
26
|
+
Must be either ``:fill_first`` or ``:stroke_first`` (or their string equivalents).
|
27
|
+
|
28
|
+
dash
|
29
|
+
default: ``''`` (no dash pattern set)
|
30
|
+
|
31
|
+
Define a dash pattern for the stroke. This is a special string with space-separated numbers that define the pattern of on-and-off alternating strokes, measured in pixels or units. For example, ``'0.02in 0.02in'`` will be an equal on-and-off dash pattern. Supports :doc:`/units`.
|
32
|
+
|
33
|
+
cap
|
34
|
+
default: ``:butt``
|
35
|
+
|
36
|
+
Define how the end of the stroke is drawn. Options are ``:square``, ``:butt``, and ``:round`` (or string equivalents of those).
|