squib 0.12.0 → 0.13.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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/CHANGELOG.md +16 -1
- data/appveyor.yml +2 -3
- data/lib/squib/args/sheet.rb +66 -34
- data/lib/squib/graphics/save_pdf.rb +1 -1
- data/lib/squib/import/data_frame.rb +7 -7
- data/lib/squib/version.rb +1 -1
- data/samples/autoscale_font/_autoscale_font.rb +1 -1
- data/samples/build_groups/build_groups.rb +3 -3
- data/samples/colors/_colors.rb +1 -0
- data/samples/{config_text_markup.rb → config/config_text_markup.rb} +0 -0
- data/samples/{custom_config.rb → config/custom_config.rb} +0 -0
- data/samples/{cairo_access.rb → images/_cairo_access.rb} +0 -0
- data/samples/images/_images.rb +1 -1
- data/samples/{unicode.rb → images/_unicode.rb} +0 -0
- data/samples/intro/01_hello.rb +1 -2
- data/samples/intro/02_options.rb +1 -2
- data/samples/intro/03_layout.rb +1 -2
- data/samples/intro/04_arrays.rb +1 -2
- data/samples/intro/05_excel.rb +3 -4
- data/samples/{tgc_proofs.rb → proofs/_tgc_proofs.rb} +1 -4
- data/samples/saves/_save_pdf.rb +7 -0
- data/samples/{embed_text.rb → text/_embed_text.rb} +1 -0
- data/samples/text/_text.rb +1 -1
- data/samples/{text_options.rb → text/_text_options.rb} +1 -1
- data/samples/{bug134.rb → text/bug134.rb} +0 -0
- data/squib.gemspec +17 -16
- metadata +90 -596
- data/benchmarks/antialias_best.rb +0 -13
- data/benchmarks/antialias_best.yml +0 -1
- data/benchmarks/antialias_fast.rb +0 -13
- data/benchmarks/antialias_fast.yml +0 -1
- data/benchmarks/backend-svg.yml +0 -4
- data/benchmarks/backend_memory.rb +0 -14
- data/benchmarks/backend_svg.rb +0 -14
- data/benchmarks/shiny-purse.png +0 -0
- data/benchmarks/spanner.svg +0 -91
- data/benchmarks/tons_of_png.rb +0 -6
- data/benchmarks/tons_of_svg.rb +0 -7
- data/benchmarks/tons_of_text.rb +0 -8
- data/docs/Makefile +0 -216
- data/docs/_static/css/squibdocs.css +0 -23
- data/docs/args/draw.rst +0 -36
- data/docs/args/expansion.rst +0 -3
- data/docs/args/layout.rst +0 -6
- data/docs/args/output_dir.rst +0 -6
- data/docs/args/range.rst +0 -6
- data/docs/args/transform.rst +0 -51
- data/docs/args/trim.rst +0 -11
- data/docs/args/wh.rst +0 -12
- data/docs/args/xy.rst +0 -12
- data/docs/arrays.rst +0 -80
- data/docs/backends.rst +0 -20
- data/docs/bleed.rst +0 -13
- data/docs/build_groups.rst +0 -45
- data/docs/colors.rst +0 -90
- data/docs/conf.py +0 -287
- data/docs/config.rst +0 -135
- data/docs/data.rst +0 -26
- data/docs/dsl/background.rst +0 -20
- data/docs/dsl/build.rst +0 -32
- data/docs/dsl/build_groups.rst +0 -23
- data/docs/dsl/circle.rst +0 -27
- data/docs/dsl/cm.rst +0 -19
- data/docs/dsl/configure.rst +0 -18
- data/docs/dsl/csv.rst +0 -81
- data/docs/dsl/curve.rst +0 -63
- data/docs/dsl/data_frame.rst +0 -85
- data/docs/dsl/deck.rst +0 -45
- data/docs/dsl/disable_build.rst +0 -25
- data/docs/dsl/disable_build_globally.rst +0 -46
- data/docs/dsl/ellipse.rst +0 -23
- data/docs/dsl/enable_build.rst +0 -25
- data/docs/dsl/enable_build_globally.rst +0 -44
- data/docs/dsl/grid.rst +0 -31
- data/docs/dsl/hand.rst +0 -40
- data/docs/dsl/hint.rst +0 -15
- data/docs/dsl/inches.rst +0 -19
- data/docs/dsl/index.rst +0 -9
- data/docs/dsl/line.rst +0 -52
- data/docs/dsl/mm.rst +0 -19
- data/docs/dsl/png.rst +0 -49
- data/docs/dsl/polygon.rst +0 -28
- data/docs/dsl/rect.rst +0 -22
- data/docs/dsl/save.rst +0 -23
- data/docs/dsl/save_pdf.rst +0 -89
- data/docs/dsl/save_png.rst +0 -46
- data/docs/dsl/save_sheet.rst +0 -55
- data/docs/dsl/showcase.rst +0 -76
- data/docs/dsl/star.rst +0 -35
- data/docs/dsl/svg.rst +0 -119
- data/docs/dsl/text.rst +0 -292
- data/docs/dsl/triangle.rst +0 -50
- data/docs/dsl/use_layout.rst +0 -16
- data/docs/dsl/xlsx.rst +0 -56
- data/docs/guides/game_icons.rst +0 -126
- data/docs/guides/getting-started/index.rst +0 -5
- data/docs/guides/getting-started/part_0_learning_ruby.rst +0 -145
- data/docs/guides/getting-started/part_1_zero_to_game.rst +0 -217
- data/docs/guides/getting-started/part_2_iconography.rst +0 -228
- data/docs/guides/getting-started/part_3_workflows.rst +0 -46
- data/docs/guides/getting-started/part_4_ruby_power.rst +0 -18
- data/docs/guides/git.rst +0 -14
- data/docs/guides/guard.rst +0 -84
- data/docs/guides/hello_world.rst +0 -65
- data/docs/guides/projects.rst +0 -35
- data/docs/help.rst +0 -157
- data/docs/index.rst +0 -35
- data/docs/install.rst +0 -68
- data/docs/layouts.rst +0 -290
- data/docs/learning.rst +0 -12
- data/docs/make.bat +0 -263
- data/docs/parameters.rst +0 -34
- data/docs/server.bat +0 -1
- data/docs/text_feature.rst +0 -115
- data/docs/units.rst +0 -14
- data/samples/autoscale_font/.gitignore +0 -2
- data/samples/autoscale_font/card_00_expected.png +0 -0
- data/samples/backend/.gitignore +0 -1
- data/samples/backend/_backend-config.yml +0 -5
- data/samples/backend/backend_00_expected.png +0 -0
- data/samples/backend/backend_01_expected.png +0 -0
- data/samples/backend/backend_vectorized_expected.pdf +0 -0
- data/samples/backend/backend_vectors_00_expected.svg +0 -84
- data/samples/backend/backend_vectors_01_expected.svg +0 -84
- data/samples/backend/shiny-purse.png +0 -0
- data/samples/backend/showcase_expected.png +0 -0
- data/samples/backend/spanner.svg +0 -91
- data/samples/ball.png +0 -0
- data/samples/build_groups/.gitignore +0 -1
- data/samples/build_groups/Rakefile +0 -25
- data/samples/colors/.gitignore +0 -1
- data/samples/colors/color_constants_00_expected.png +0 -0
- data/samples/colors/colors_00_expected.png +0 -0
- data/samples/colors/gradient_00_expected.png +0 -0
- data/samples/config_disable_quotes.yml +0 -3
- data/samples/config_text_markup.yml +0 -9
- data/samples/custom-config.yml +0 -5
- data/samples/customconfig-imgdir/shiny-purse2.png +0 -0
- data/samples/customconfig-imgdir/spanner2.svg +0 -91
- data/samples/data/.gitignore +0 -1
- data/samples/data/explode_quantities.xlsx +0 -0
- data/samples/data/quantity_explosion.csv +0 -3
- data/samples/data/sample.csv +0 -3
- data/samples/data/sample.xlsx +0 -0
- data/samples/data/sample_csv_00_expected.png +0 -0
- data/samples/data/sample_csv_01_expected.png +0 -0
- data/samples/data/sample_csv_qty_00_expected.png +0 -0
- data/samples/data/sample_excel_00_expected.png +0 -0
- data/samples/data/sample_excel_01_expected.png +0 -0
- data/samples/data/sample_excel_02_expected.png +0 -0
- data/samples/data/sample_excel_resources_00_expected.png +0 -0
- data/samples/data/sample_excel_resources_01_expected.png +0 -0
- data/samples/data/sample_xlsx_qty_00_expected.png +0 -0
- data/samples/glass-heart.svg +0 -52
- data/samples/grit.png +0 -0
- data/samples/images/.gitignore +0 -8
- data/samples/images/_images_00_expected.png +0 -0
- data/samples/images/angler-fish.png +0 -0
- data/samples/images/ball.png +0 -0
- data/samples/images/glass-heart.svg +0 -52
- data/samples/images/grit.png +0 -0
- data/samples/images/offset.svg +0 -85
- data/samples/images/robot-golem.svg +0 -1
- data/samples/images/shiny-purse.png +0 -0
- data/samples/images/spanner.svg +0 -91
- data/samples/images/sprites.png +0 -0
- data/samples/images/with-alpha.png +0 -0
- data/samples/intro/.gitignore +0 -2
- data/samples/intro/auto-repair.svg +0 -1
- data/samples/intro/crawling.svg +0 -1
- data/samples/intro/data.xlsx +0 -0
- data/samples/intro/humans.svg +0 -1
- data/samples/intro/ninja-mask.svg +0 -1
- data/samples/intro/part1_00_expected.png +0 -0
- data/samples/intro/part2_00_expected.png +0 -0
- data/samples/intro/part3_00_expected.png +0 -0
- data/samples/intro/part3_layout.yml +0 -34
- data/samples/intro/part4_00_expected.png +0 -0
- data/samples/intro/part4_01_expected.png +0 -0
- data/samples/intro/part5_00_expected.png +0 -0
- data/samples/intro/part5_01_expected.png +0 -0
- data/samples/intro/part5_02_expected.png +0 -0
- data/samples/intro/part5_03_expected.png +0 -0
- data/samples/intro/part5_hand_expected.png +0 -0
- data/samples/intro/part5_showcase_expected.png +0 -0
- data/samples/intro/pirate-skull.svg +0 -1
- data/samples/intro/robot-golem.svg +0 -1
- data/samples/layouts/custom-layout.yml +0 -60
- data/samples/layouts/custom-layout2.yml +0 -15
- data/samples/layouts/expected_layouts_builtin_economy_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_fantasy_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_hand_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_playing_card_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_tuck_box_00.png +0 -0
- data/samples/layouts/shiny-purse.png +0 -0
- data/samples/layouts/spanner.svg +0 -91
- data/samples/load_images_config.yml +0 -1
- data/samples/offset.svg +0 -71
- data/samples/pokercard.png +0 -0
- data/samples/project/Gemfile +0 -6
- data/samples/project/Guardfile +0 -18
- data/samples/project/Rakefile +0 -25
- data/samples/project/bw/robot-golem.svg +0 -53
- data/samples/project/color/robot-golem.svg +0 -1
- data/samples/project/config.yml +0 -2
- data/samples/project/layouts/characters.yml +0 -3
- data/samples/project/layouts/skills.yml +0 -3
- data/samples/ranges/glass-heart.svg +0 -52
- data/samples/ranges/ranges_00_expected.png +0 -0
- data/samples/saves/.gitignore +0 -1
- data/samples/saves/hand_expected.png +0 -0
- data/samples/saves/hand_pretty_expected.png +0 -0
- data/samples/saves/save-pdf-small_expected.pdf +0 -0
- data/samples/saves/save-pdf_expected.pdf +0 -0
- data/samples/saves/save_png_00_expected.png +0 -0
- data/samples/saves/save_png_trimmed_00_expected.png +0 -0
- data/samples/saves/save_sheet_00_expected.png +0 -0
- data/samples/saves/save_sheet_01_expected.png +0 -0
- data/samples/saves/save_sheet_range_00_expected.png +0 -0
- data/samples/saves/save_sheet_range_01_expected.png +0 -0
- data/samples/saves/save_single_sheet_00_expected.png +0 -0
- data/samples/saves/saves_notrim_01_expected.png +0 -0
- data/samples/saves/showcase2_expected.png +0 -0
- data/samples/saves/showcase_expected.png +0 -0
- data/samples/saves/showcase_individual_00_expected.png +0 -0
- data/samples/saves/showcase_individual_01_expected.png +0 -0
- data/samples/saves/showcase_individual_02_expected.png +0 -0
- data/samples/saves/showcase_individual_03_expected.png +0 -0
- data/samples/saves/spanner.svg +0 -91
- data/samples/shapes/.gitignore +0 -1
- data/samples/shapes/shape_00_expected.png +0 -0
- data/samples/shiny-purse.png +0 -0
- data/samples/spanner.svg +0 -91
- data/samples/sprites.png +0 -0
- data/samples/text/.gitignore +0 -2
- data/samples/text/README.md +0 -1
- data/samples/text/_text_00_expected.png +0 -0
- data/samples/text/config.yml +0 -2
- data/samples/units/units_00_expected.png +0 -0
- data/samples/units/using_units.yml +0 -10
- data/spec/api/api_data_spec.rb +0 -172
- data/spec/api/api_groups_spec.rb +0 -49
- data/spec/api/api_settings_spec.rb +0 -38
- data/spec/api/api_units_spec.rb +0 -37
- data/spec/args/box_spec.rb +0 -127
- data/spec/args/draw_spec.rb +0 -101
- data/spec/args/embed_key_spec.rb +0 -13
- data/spec/args/input_file_spec.rb +0 -21
- data/spec/args/paint_spec.rb +0 -22
- data/spec/args/paragraph_spec.rb +0 -153
- data/spec/args/range_spec.rb +0 -41
- data/spec/args/save_batch_spec.rb +0 -51
- data/spec/args/scale_box_spec.rb +0 -71
- data/spec/args/sheet_spec.rb +0 -80
- data/spec/args/showcase_special_spec.rb +0 -15
- data/spec/args/transform_spec.rb +0 -25
- data/spec/args/typographer_spec.rb +0 -71
- data/spec/args/unit_conversion_spec.rb +0 -29
- data/spec/card_spec.rb +0 -11
- data/spec/commands/new_spec.rb +0 -48
- data/spec/conf_spec.rb +0 -47
- data/spec/data/conf/basic.yml +0 -1
- data/spec/data/conf/empty.yml +0 -1
- data/spec/data/conf/unrecognized.yml +0 -4
- data/spec/data/csv/basic.csv +0 -3
- data/spec/data/csv/custom_opts.csv +0 -2
- data/spec/data/csv/dup_cols.csv +0 -3
- data/spec/data/csv/newline.csv +0 -3
- data/spec/data/csv/qty.csv +0 -3
- data/spec/data/csv/qty_named.csv +0 -3
- data/spec/data/csv/with_spaces.csv +0 -3
- data/spec/data/csv/yield.csv +0 -3
- data/spec/data/layouts/easy-circular-extends.yml +0 -6
- data/spec/data/layouts/empty-rule.yml +0 -1
- data/spec/data/layouts/empty.yml +0 -1
- data/spec/data/layouts/extends-nonexists.yml +0 -3
- data/spec/data/layouts/extends-units-mixed.yml +0 -8
- data/spec/data/layouts/extends-units.yml +0 -8
- data/spec/data/layouts/hard-circular-extends.yml +0 -9
- data/spec/data/layouts/multi-extends-single-entry.yml +0 -14
- data/spec/data/layouts/multi-level-extends.yml +0 -10
- data/spec/data/layouts/multifile-a.yml +0 -4
- data/spec/data/layouts/multifile-b.yml +0 -4
- data/spec/data/layouts/multifile-extends-a.yml +0 -8
- data/spec/data/layouts/multifile-extends-b.yml +0 -9
- data/spec/data/layouts/no-extends.yml +0 -5
- data/spec/data/layouts/pre-extends.yml +0 -7
- data/spec/data/layouts/self-circular-extends.yml +0 -3
- data/spec/data/layouts/single-extends.yml +0 -7
- data/spec/data/layouts/single-level-multi-extends.yml +0 -12
- data/spec/data/samples/autoscale_font/_autoscale_font.rb.txt +0 -133
- data/spec/data/samples/basic.rb.txt +0 -248
- data/spec/data/samples/cairo_access.rb.txt +0 -59
- data/spec/data/samples/colors/_gradients.rb.txt +0 -84
- data/spec/data/samples/config_text_markup.rb.txt +0 -74
- data/spec/data/samples/custom_config.rb.txt +0 -59
- data/spec/data/samples/data/_csv.rb.txt +0 -231
- data/spec/data/samples/data/_excel.rb.txt +0 -704
- data/spec/data/samples/embed_text.rb.txt +0 -431
- data/spec/data/samples/hello_world.rb.txt +0 -38
- data/spec/data/samples/images/_more_load_images.rb.txt +0 -335
- data/spec/data/samples/layouts.rb.txt +0 -489
- data/spec/data/samples/ranges/_ranges.rb.txt +0 -484
- data/spec/data/samples/saves/_hand.rb.txt +0 -594
- data/spec/data/samples/saves/_portrait_landscape.rb.txt +0 -57
- data/spec/data/samples/saves/_save_pdf.rb.txt +0 -1601
- data/spec/data/samples/saves/_saves.rb.txt +0 -873
- data/spec/data/samples/saves/_showcase.rb.txt +0 -5942
- data/spec/data/samples/shapes/_draw_shapes.rb.txt +0 -757
- data/spec/data/samples/text_options.rb.txt +0 -1158
- data/spec/data/samples/tgc_proofs.rb.txt +0 -102
- data/spec/data/samples/units/_units.rb.txt +0 -53
- data/spec/data/xlsx/basic.xlsx +0 -0
- data/spec/data/xlsx/explode_quantities.xlsx +0 -0
- data/spec/data/xlsx/formulas.xlsx +0 -0
- data/spec/data/xlsx/whitespace.xlsx +0 -0
- data/spec/data/xlsx/with_macros.xlsm +0 -0
- data/spec/deck_spec.rb +0 -73
- data/spec/graphics/cairo_context_wrapper_spec.rb +0 -104
- data/spec/graphics/embedding_utils_spec.rb +0 -73
- data/spec/graphics/graphics_save_doc_spec.rb +0 -74
- data/spec/import/data_frame_spec.rb +0 -251
- data/spec/layout_parser_spec.rb +0 -226
- data/spec/logger_spec.rb +0 -12
- data/spec/samples/_diffs/gitkeep.txt +0 -0
- data/spec/samples/diff-with-css.example.html +0 -39
- data/spec/samples/expected/autoscale_00.png +0 -0
- data/spec/samples/expected/autoscale_01.png +0 -0
- data/spec/samples/expected/autoscale_02.png +0 -0
- data/spec/samples/expected/backend_00.png +0 -0
- data/spec/samples/expected/backend_00.svg +0 -78
- data/spec/samples/expected/backend_01.png +0 -0
- data/spec/samples/expected/backend_01.svg +0 -78
- data/spec/samples/expected/basic_00.png +0 -0
- data/spec/samples/expected/basic_01.png +0 -0
- data/spec/samples/expected/basic_02.png +0 -0
- data/spec/samples/expected/cairo_access_00.png +0 -0
- data/spec/samples/expected/cairo_access_01.png +0 -0
- data/spec/samples/expected/card_00.png +0 -0
- data/spec/samples/expected/card_01.png +0 -0
- data/spec/samples/expected/colors_00.png +0 -0
- data/spec/samples/expected/config_disable_text_00.png +0 -0
- data/spec/samples/expected/config_text_00.png +0 -0
- data/spec/samples/expected/custom-config_00.png +0 -0
- data/spec/samples/expected/embed_00.png +0 -0
- data/spec/samples/expected/embed_multisheet_00.png +0 -0
- data/spec/samples/expected/gitkeep.txt +0 -0
- data/spec/samples/expected/gradient_00.png +0 -0
- data/spec/samples/expected/hand.png +0 -0
- data/spec/samples/expected/hand_pretty.png +0 -0
- data/spec/samples/expected/landscape_00.png +0 -0
- data/spec/samples/expected/layout2_00.png +0 -0
- data/spec/samples/expected/layout_00.png +0 -0
- data/spec/samples/expected/layout_builtin_hand_00.png +0 -0
- data/spec/samples/expected/layout_builtin_playing_card_00.png +0 -0
- data/spec/samples/expected/load_images_00.png +0 -0
- data/spec/samples/expected/portrait_00.png +0 -0
- data/spec/samples/expected/ranges_00.png +0 -0
- data/spec/samples/expected/sample_csv_00.png +0 -0
- data/spec/samples/expected/sample_csv_01.png +0 -0
- data/spec/samples/expected/sample_excel_00.png +0 -0
- data/spec/samples/expected/sample_excel_01.png +0 -0
- data/spec/samples/expected/sample_excel_02.png +0 -0
- data/spec/samples/expected/save_sheet_00.png +0 -0
- data/spec/samples/expected/save_sheet_01.png +0 -0
- data/spec/samples/expected/save_sheet_range_00.png +0 -0
- data/spec/samples/expected/save_sheet_range_01.png +0 -0
- data/spec/samples/expected/save_single_sheet_00.png +0 -0
- data/spec/samples/expected/saves_notrim_01.png +0 -0
- data/spec/samples/expected/shape_00.png +0 -0
- data/spec/samples/expected/showcase.png +0 -0
- data/spec/samples/expected/showcase2.png +0 -0
- data/spec/samples/expected/showcase_individual_00.png +0 -0
- data/spec/samples/expected/showcase_individual_01.png +0 -0
- data/spec/samples/expected/showcase_individual_02.png +0 -0
- data/spec/samples/expected/showcase_individual_03.png +0 -0
- data/spec/samples/expected/text_00.png +0 -0
- data/spec/samples/expected/text_01.png +0 -0
- data/spec/samples/expected/text_02.png +0 -0
- data/spec/samples/expected/tgc_sample_00.png +0 -0
- data/spec/samples/expected/units_00.png +0 -0
- data/spec/samples/run_samples_spec.rb +0 -17
- data/spec/samples/samples_regression_spec.rb +0 -71
- data/spec/samples/sanity.html.erb +0 -28
- data/spec/samples/sanity.rb +0 -70
- data/spec/sanity/.gitignore +0 -1
- data/spec/sanity/sanity.html.erb +0 -42
- data/spec/sanity/sanity_test.rb +0 -42
- data/spec/sanity/tests.yml +0 -12
- data/spec/spec_helper.rb +0 -159
data/docs/dsl/mm.rst
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
mm
|
|
2
|
-
------
|
|
3
|
-
|
|
4
|
-
Given millimeters, returns the number of pixels according to the deck's DPI.
|
|
5
|
-
|
|
6
|
-
Parameters
|
|
7
|
-
^^^^^^^^^^
|
|
8
|
-
|
|
9
|
-
n
|
|
10
|
-
the number of mm
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Examples
|
|
14
|
-
^^^^^^^^
|
|
15
|
-
|
|
16
|
-
.. code-block:: ruby
|
|
17
|
-
|
|
18
|
-
mm(1) # 11.811px (for default Deck::dpi of 300)
|
|
19
|
-
mm(2) + mm(1) # 35.433ox (for default Deck::dpi of 300)
|
data/docs/dsl/png.rst
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
png
|
|
2
|
-
===
|
|
3
|
-
|
|
4
|
-
Renders PNG images.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
.. include:: /args/expansion.rst
|
|
9
|
-
|
|
10
|
-
file
|
|
11
|
-
default: ``''`` (empty string)
|
|
12
|
-
|
|
13
|
-
file(s) to read in. As in :doc:`/arrays`, if this a single file, then it's use for every card in range. If the parameter is an Array of files, then each file is looked up for each card. If any of them are nil or '', nothing is done for that card.
|
|
14
|
-
|
|
15
|
-
.. include:: /args/xy.rst
|
|
16
|
-
|
|
17
|
-
width
|
|
18
|
-
default: ``:native``
|
|
19
|
-
|
|
20
|
-
the pixel width that the image should scale to. Supports :doc:`/units`. When set to ``:native``, uses the DPI and units of the loaded SVG document. Using ``:deck`` will scale to the deck width. Using ``:scale`` will use the ``height`` to scale and keep native the aspect ratio. Scaling PNGs is not recommended for professional-looking cards, and up-scaling a PNG will throw a warning in the console (see :doc:`/config`).
|
|
21
|
-
|
|
22
|
-
height
|
|
23
|
-
default: ``:native``
|
|
24
|
-
|
|
25
|
-
the pixel height that the image should scale to. Supports :doc:`/units`. When set to ``:native``, uses the DPI and units of the loaded SVG document. Using ``:deck`` will scale to the deck height. Using ``:scale`` will use the ``width`` to scale and keep native the aspect ratio. Scaling PNGs is not recommended for professional-looking cards, and up-scaling a PNG will throw a warning in the console (see :doc:`/config`).
|
|
26
|
-
|
|
27
|
-
alpha
|
|
28
|
-
default: 1.0
|
|
29
|
-
|
|
30
|
-
the alpha-transparency percentage used to blend this image. Must be between ``0.0`` and ``1.0``
|
|
31
|
-
|
|
32
|
-
blend
|
|
33
|
-
default: ``:none``
|
|
34
|
-
|
|
35
|
-
the composite blend operator used when applying this image. See Blend Modes at http://cairographics.org/operators.
|
|
36
|
-
The possibilties include :none, :multiply, :screen, :overlay, :darken, :lighten, :color_dodge, :color_burn, :hard_light, :soft_light, :difference, :exclusion, :hsl_hue, :hsl_saturation, :hsl_color, :hsl_luminosity. String versions of these options are accepted too.
|
|
37
|
-
|
|
38
|
-
mask
|
|
39
|
-
default: ``nil``
|
|
40
|
-
|
|
41
|
-
Accepts a color (see :doc:`/colors`). If specified, the image will be used as a mask for the given color/gradient. Transparent pixels are ignored, opaque pixels are the given color. Note: the origin for gradient coordinates is at the given x,y, not at 0,0 as it is most other places.
|
|
42
|
-
|
|
43
|
-
.. include:: /args/transform.rst
|
|
44
|
-
|
|
45
|
-
.. include:: /args/range.rst
|
|
46
|
-
.. include:: /args/layout.rst
|
|
47
|
-
|
|
48
|
-
Examples
|
|
49
|
-
--------
|
data/docs/dsl/polygon.rst
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
polygon
|
|
2
|
-
-------
|
|
3
|
-
|
|
4
|
-
Draw an n-sided regular polygon, centered at x,y.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
^^^^^^^
|
|
8
|
-
.. include:: /args/expansion.rst
|
|
9
|
-
|
|
10
|
-
.. include:: /args/xy.rst
|
|
11
|
-
|
|
12
|
-
radius
|
|
13
|
-
default: 0
|
|
14
|
-
|
|
15
|
-
the distance from the center of the star to the inner circle of its points. Supports :doc:`/units`.
|
|
16
|
-
|
|
17
|
-
angle
|
|
18
|
-
default: 0
|
|
19
|
-
|
|
20
|
-
the angle at which to rotate the star
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.. include:: /args/draw.rst
|
|
24
|
-
.. include:: /args/range.rst
|
|
25
|
-
.. include:: /args/layout.rst
|
|
26
|
-
|
|
27
|
-
Examples
|
|
28
|
-
^^^^^^^^
|
data/docs/dsl/rect.rst
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
rect
|
|
2
|
-
----
|
|
3
|
-
|
|
4
|
-
Draw a rounded rectangle
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
^^^^^^^
|
|
8
|
-
.. include:: /args/expansion.rst
|
|
9
|
-
|
|
10
|
-
.. include:: /args/xy.rst
|
|
11
|
-
.. include:: /args/wh.rst
|
|
12
|
-
.. include:: /args/draw.rst
|
|
13
|
-
.. include:: /args/range.rst
|
|
14
|
-
.. include:: /args/layout.rst
|
|
15
|
-
|
|
16
|
-
angle
|
|
17
|
-
default: 0
|
|
18
|
-
|
|
19
|
-
the angle at which to rotate the rectangle about it's upper-left corner
|
|
20
|
-
|
|
21
|
-
Examples
|
|
22
|
-
^^^^^^^^
|
data/docs/dsl/save.rst
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
save
|
|
2
|
-
====
|
|
3
|
-
|
|
4
|
-
Saves the given range of cards to either PNG or PDF. Wrapper method for other save methods.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
|
|
9
|
-
This method delegates everything to :doc:`save_png` or :doc:`save_pdf` using the ``format`` option. All other options are passed along.
|
|
10
|
-
|
|
11
|
-
format
|
|
12
|
-
default: ``[]`` (do nothing)
|
|
13
|
-
|
|
14
|
-
Use ``:png`` to save as a PNG, and ``:pdf`` to save as PDF. To save to both at once, use ``[:png, :pdf]``
|
|
15
|
-
|
|
16
|
-
Examples
|
|
17
|
-
--------
|
|
18
|
-
|
|
19
|
-
::
|
|
20
|
-
|
|
21
|
-
save format: :png, prefix: 'front_' # same as: save_png prefix: 'front_'
|
|
22
|
-
save format: :pdf, prefix: 'cards_' # same as: save_pdf prefix: 'cards_'
|
|
23
|
-
save format: [:png, :pdf] # same as: save_png; save_pdf
|
data/docs/dsl/save_pdf.rst
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
save_pdf
|
|
2
|
-
========
|
|
3
|
-
|
|
4
|
-
Lays out the cards in a gride and renders a PDF.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
|
|
9
|
-
file
|
|
10
|
-
default: ``'output.pdf'``
|
|
11
|
-
|
|
12
|
-
the name of the PDF file to save. Will be overwritten without warning.
|
|
13
|
-
|
|
14
|
-
dir
|
|
15
|
-
default: ``_output``
|
|
16
|
-
|
|
17
|
-
the directory to save to. Created if it doesn't exist.
|
|
18
|
-
|
|
19
|
-
width
|
|
20
|
-
default: ``3300``
|
|
21
|
-
|
|
22
|
-
the height of the page in pixels. Default is 11in * 300dpi. Supports :doc:`/units`.
|
|
23
|
-
|
|
24
|
-
height
|
|
25
|
-
default: ``2550``
|
|
26
|
-
|
|
27
|
-
the height of the page in pixels. Default is 8.5in * 300dpi. Supports :doc:`/units`.
|
|
28
|
-
|
|
29
|
-
margin
|
|
30
|
-
default: ``75``
|
|
31
|
-
|
|
32
|
-
the margin around the outside of the page. Supports :doc:`/units`.
|
|
33
|
-
|
|
34
|
-
gap
|
|
35
|
-
default: ``0``
|
|
36
|
-
|
|
37
|
-
the space in pixels between the cards. Supports :doc:`/units`.
|
|
38
|
-
|
|
39
|
-
trim
|
|
40
|
-
default: ``0``
|
|
41
|
-
|
|
42
|
-
the space around the edge of each card to trim (e.g. to cut off the bleed margin for print-and-play). Supports :doc:`/units`.
|
|
43
|
-
|
|
44
|
-
crop_marks
|
|
45
|
-
default: ``false``
|
|
46
|
-
|
|
47
|
-
When ``true``, draws lines in the margins as guides for cutting. Crop marks factor in the ``trim`` (if non-zero), and can also be customized via ``crop_margin_*`` options (see below). Has no effect if ``margin`` is 0.
|
|
48
|
-
|
|
49
|
-
.. warning::
|
|
50
|
-
|
|
51
|
-
Enabling this feature will draw lines to the edge of the page. Most PDF Readers, by default, will recognize this and scale down the entire PDF to fit in those crop marks - throwing off your overall scale. To disable this, you will need to set Print Scaling "Use original" or "None" when you go to print (this looks different for different PDF readers). Be sure to test this out before you do your big print job!!
|
|
52
|
-
|
|
53
|
-
crop_margin_bottom
|
|
54
|
-
default: 0
|
|
55
|
-
|
|
56
|
-
The space between the bottom edge of the (potentially trimmed) card, and the crop mark. Supports :doc:`/units`. Has no effect if ``crop_marks`` is ``false``.
|
|
57
|
-
|
|
58
|
-
crop_margin_left
|
|
59
|
-
default: 0
|
|
60
|
-
|
|
61
|
-
The space between the left edge of the (potentially trimmed) card, and the crop mark. Supports :doc:`/units`. Has no effect if ``crop_marks`` is ``false``.
|
|
62
|
-
|
|
63
|
-
crop_margin_right
|
|
64
|
-
default: ``0``
|
|
65
|
-
|
|
66
|
-
The space between the right edge of the (potentially trimmed) card, and the crop mark. Supports :doc:`/units`. Has no effect if ``crop_marks`` is ``false``.
|
|
67
|
-
|
|
68
|
-
crop_margin_top
|
|
69
|
-
default: ``0``
|
|
70
|
-
|
|
71
|
-
The space between the top edge of the (potentially trimmed) card, and the crop mark. Supports :doc:`/units`. Has no effect if ``crop_marks`` is ``false``.
|
|
72
|
-
|
|
73
|
-
crop_stroke_color
|
|
74
|
-
default: ``:black``
|
|
75
|
-
|
|
76
|
-
The color of the crop mark lines. Has no effect if ``crop_marks`` is ``false``.
|
|
77
|
-
|
|
78
|
-
crop_stroke_dash
|
|
79
|
-
default: ``''``
|
|
80
|
-
|
|
81
|
-
Define a dash pattern for the crop marks. 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`. Has no effect if ``crop_marks`` is ``false``.
|
|
82
|
-
|
|
83
|
-
crop_stroke_width
|
|
84
|
-
default: ``1.5``
|
|
85
|
-
|
|
86
|
-
Width of the crop mark lines. Has no effect if ``crop_marks`` is ``false``.
|
|
87
|
-
|
|
88
|
-
Examples
|
|
89
|
-
--------
|
data/docs/dsl/save_png.rst
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
save_png
|
|
2
|
-
========
|
|
3
|
-
|
|
4
|
-
Saves the given range of cards to a PNG
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
range
|
|
11
|
-
default ``:all``
|
|
12
|
-
|
|
13
|
-
the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges}
|
|
14
|
-
|
|
15
|
-
dir
|
|
16
|
-
default: ``'_output'``
|
|
17
|
-
|
|
18
|
-
the directory for the output to be sent to. Will be created if it doesn't exist.
|
|
19
|
-
|
|
20
|
-
prefix
|
|
21
|
-
default ``'card_'``
|
|
22
|
-
|
|
23
|
-
the prefix of the file name to be printed.
|
|
24
|
-
|
|
25
|
-
count_format
|
|
26
|
-
default: ``'%02d'``
|
|
27
|
-
|
|
28
|
-
the format string used for formatting the card count (e.g. padding zeros). Uses a Ruby format string (see the Ruby doc for ``Kernel::sprintf`` for specifics)
|
|
29
|
-
|
|
30
|
-
rotate
|
|
31
|
-
default: ``false``
|
|
32
|
-
|
|
33
|
-
If ``true``, the saved cards will be rotated 90 degrees clockwise. Or, rotate by the number of radians. Intended to rendering landscape instead of portrait. Possible values: ``true``, ``false``, ``:clockwise``, ``:counterclockwise``
|
|
34
|
-
|
|
35
|
-
trim
|
|
36
|
-
default: ``0``
|
|
37
|
-
|
|
38
|
-
the space around the edge of each card to trim (e.g. to cut off the bleed margin for print-and-play). Supports :doc:`/units`.
|
|
39
|
-
|
|
40
|
-
trim_radius
|
|
41
|
-
default: ``0``
|
|
42
|
-
|
|
43
|
-
the rounded rectangle radius around the card to trim before saving.
|
|
44
|
-
|
|
45
|
-
Examples
|
|
46
|
-
--------
|
data/docs/dsl/save_sheet.rst
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
save_sheet
|
|
2
|
-
==========
|
|
3
|
-
|
|
4
|
-
Lays out the cards in range and renders a stitched PNG sheet
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
|
|
9
|
-
range
|
|
10
|
-
default: ``:all``
|
|
11
|
-
|
|
12
|
-
the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges}
|
|
13
|
-
|
|
14
|
-
columns
|
|
15
|
-
default: ``5``
|
|
16
|
-
|
|
17
|
-
the number of columns in the grid. Must be an integer
|
|
18
|
-
|
|
19
|
-
rows
|
|
20
|
-
default: ``:infinite``
|
|
21
|
-
|
|
22
|
-
the number of rows in the grid. When set to :infinite, the sheet scales to the rows needed. If there are more cards than rows*columns, new sheets are started.
|
|
23
|
-
|
|
24
|
-
prefix
|
|
25
|
-
default: ``card_``
|
|
26
|
-
|
|
27
|
-
the prefix of the file name(s)
|
|
28
|
-
|
|
29
|
-
count_format
|
|
30
|
-
default: ``'%02d'``
|
|
31
|
-
|
|
32
|
-
the format string used for formatting the card count (e.g. padding zeros). Uses a Ruby format string (see the Ruby doc for ``Kernel::sprintf`` for specifics)
|
|
33
|
-
|
|
34
|
-
dir
|
|
35
|
-
default: ``'_output'``
|
|
36
|
-
|
|
37
|
-
the directory to save to. Created if it doesn't exist.
|
|
38
|
-
|
|
39
|
-
margin
|
|
40
|
-
default: ``0``
|
|
41
|
-
|
|
42
|
-
the margin around the outside of the sheet. Supports :doc:`/units`.
|
|
43
|
-
|
|
44
|
-
gap
|
|
45
|
-
default ``0``
|
|
46
|
-
|
|
47
|
-
the space in pixels between the cards. Supports :doc:`/units`.
|
|
48
|
-
|
|
49
|
-
trim
|
|
50
|
-
default ``0``
|
|
51
|
-
|
|
52
|
-
the space around the edge of each card to trim (e.g. to cut off the bleed margin for print-and-play). Supports :doc:`/units`.
|
|
53
|
-
|
|
54
|
-
Examples
|
|
55
|
-
--------
|
data/docs/dsl/showcase.rst
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
showcase
|
|
2
|
-
========
|
|
3
|
-
|
|
4
|
-
Renders a range of cards in a showcase as if they are sitting in 3D on a reflective surface.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
|
|
9
|
-
.. include:: /args/trim.rst
|
|
10
|
-
|
|
11
|
-
scale
|
|
12
|
-
default: ``0.8``
|
|
13
|
-
|
|
14
|
-
Percentage of original width of each (trimmed) card to scale to. Must be between 0.0 and 1.0, but starts looking bad around 0.6.
|
|
15
|
-
|
|
16
|
-
offset
|
|
17
|
-
default: ``1.1``
|
|
18
|
-
|
|
19
|
-
Percentage of the scaled width of each card to shift each offset. e.g. 1.1 is a 10% shift, and 0.95 is overlapping by 5%
|
|
20
|
-
|
|
21
|
-
fill_color
|
|
22
|
-
default: ``:white``
|
|
23
|
-
|
|
24
|
-
Backdrop color. Usually black or white. See :doc:`/colors`.
|
|
25
|
-
|
|
26
|
-
reflect_offset
|
|
27
|
-
default: ``15``
|
|
28
|
-
|
|
29
|
-
The number of pixels between the bottom of the card and the reflection. See :doc:`/units`
|
|
30
|
-
|
|
31
|
-
reflect_strength
|
|
32
|
-
default: ``0.2``
|
|
33
|
-
|
|
34
|
-
The starting alpha transparency of the reflection (at the top of the card). Percentage between 0 and 1. Looks more realistic at low values since even shiny surfaces lose a lot of light.
|
|
35
|
-
|
|
36
|
-
reflect_percent
|
|
37
|
-
default: ``0.25``
|
|
38
|
-
|
|
39
|
-
The length of the reflection in percentage of the card. Larger values tend to make the reflection draw just as much attention as the card, which is not good.
|
|
40
|
-
|
|
41
|
-
face
|
|
42
|
-
default: ``:left``
|
|
43
|
-
|
|
44
|
-
which direction the cards face. Anything but ``:right`` will face left
|
|
45
|
-
|
|
46
|
-
margin
|
|
47
|
-
default: ``75``
|
|
48
|
-
|
|
49
|
-
the margin around the entire image. Supports :doc:`/units`
|
|
50
|
-
|
|
51
|
-
fill_color
|
|
52
|
-
default: ``:white``
|
|
53
|
-
|
|
54
|
-
Backdrop color. Supports :doc:`/colors`.
|
|
55
|
-
|
|
56
|
-
file
|
|
57
|
-
default: ``'showcase.png'``
|
|
58
|
-
|
|
59
|
-
The file to save relative to the current directory. Will overwrite without warning.
|
|
60
|
-
|
|
61
|
-
.. include:: /args/output_dir.rst
|
|
62
|
-
.. include:: /args/range.rst
|
|
63
|
-
|
|
64
|
-
Examples
|
|
65
|
-
--------
|
|
66
|
-
|
|
67
|
-
This sample `lives here <https://github.com/andymeneely/squib/tree/master/samples/saves>`_.
|
|
68
|
-
|
|
69
|
-
.. literalinclude:: ../../samples/saves/_showcase.rb
|
|
70
|
-
:language: ruby
|
|
71
|
-
:linenos:
|
|
72
|
-
|
|
73
|
-
.. raw:: html
|
|
74
|
-
|
|
75
|
-
<img src="../saves/showcase_expected.png" class="figure">
|
|
76
|
-
<img src="../saves/showcase2_expected.png" class="figure">
|
data/docs/dsl/star.rst
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
star
|
|
2
|
-
----
|
|
3
|
-
|
|
4
|
-
Draw an n-pointed star, centered at x,y.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
^^^^^^^
|
|
8
|
-
.. include:: /args/expansion.rst
|
|
9
|
-
|
|
10
|
-
.. include:: /args/xy.rst
|
|
11
|
-
|
|
12
|
-
inner_radius
|
|
13
|
-
default: 0
|
|
14
|
-
|
|
15
|
-
the distance from the center of the star to the inner circle of its points. Supports :doc:`/units`.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
outer_radius
|
|
19
|
-
default: 0
|
|
20
|
-
|
|
21
|
-
the distance from the center of the star to the outer circle of its points. Supports :doc:`/units`.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
angle
|
|
25
|
-
default: 0
|
|
26
|
-
|
|
27
|
-
the angle at which to rotate the star
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.. include:: /args/draw.rst
|
|
31
|
-
.. include:: /args/range.rst
|
|
32
|
-
.. include:: /args/layout.rst
|
|
33
|
-
|
|
34
|
-
Examples
|
|
35
|
-
^^^^^^^^
|