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/svg.rst
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
svg
|
|
2
|
-
===
|
|
3
|
-
|
|
4
|
-
Renders an entire svg file at the given location. Uses the SVG-specified units and DPI to determine the pixel width and height. If neither data nor file are specified for a given card, this method does nothing.
|
|
5
|
-
|
|
6
|
-
.. note::
|
|
7
|
-
|
|
8
|
-
Note: if alpha transparency is desired, set that in the SVG.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Options
|
|
12
|
-
-------
|
|
13
|
-
.. include:: /args/expansion.rst
|
|
14
|
-
|
|
15
|
-
file
|
|
16
|
-
default: ``''`` (empty string)
|
|
17
|
-
|
|
18
|
-
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.
|
|
19
|
-
|
|
20
|
-
.. include:: /args/xy.rst
|
|
21
|
-
|
|
22
|
-
range
|
|
23
|
-
default: ``all``
|
|
24
|
-
|
|
25
|
-
the range of cards over which this will be rendered. See :doc:`/arrays`
|
|
26
|
-
|
|
27
|
-
data
|
|
28
|
-
default: ``nil``
|
|
29
|
-
|
|
30
|
-
render from an SVG XML string. Overrides ``file`` if both are specified (a warning is shown).
|
|
31
|
-
|
|
32
|
-
id
|
|
33
|
-
default: ``nil``
|
|
34
|
-
|
|
35
|
-
if set, then only render the SVG element with the given id. Prefix '#' is optional. Note: the x-y coordinates are still relative to the SVG document's page.
|
|
36
|
-
|
|
37
|
-
force_id
|
|
38
|
-
default: ``false``
|
|
39
|
-
|
|
40
|
-
if set to ``true``, then this svg will not be rendered at all if the id is empty or nil. If not set, the entire SVG is rendered. Useful for putting multple icons in a single SVG file.
|
|
41
|
-
|
|
42
|
-
width
|
|
43
|
-
default: ``native``
|
|
44
|
-
|
|
45
|
-
the pixel width that the image should scale to. Setting this to ``:deck`` will scale to the deck height. ``:scale`` will use the width to scale and keep native the aspect ratio. SVG scaling is done with vectors, so the scaling should be smooth. When set to ``:native``, uses the DPI and units of the loaded SVG document.
|
|
46
|
-
|
|
47
|
-
height
|
|
48
|
-
default: ``:native``
|
|
49
|
-
|
|
50
|
-
the pixel width that the image should scale to. ``:deck`` will scale to the deck height. ``:scale`` will use the width to scale and keep native the aspect ratio. SVG scaling is done with vectors, so the scaling should be smooth. When set to ``:native``, uses the DPI and units of the loaded SVG document.
|
|
51
|
-
|
|
52
|
-
blend
|
|
53
|
-
default: ``:none``
|
|
54
|
-
|
|
55
|
-
the composite blend operator used when applying this image. See Blend Modes at http://cairographics.org/operators.
|
|
56
|
-
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.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
angle
|
|
60
|
-
default: ``0``
|
|
61
|
-
|
|
62
|
-
rotation of the image in radians. Note that this rotates around the upper-left corner, making the placement of x-y coordinates slightly tricky.
|
|
63
|
-
|
|
64
|
-
mask
|
|
65
|
-
default: ``nil``
|
|
66
|
-
|
|
67
|
-
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.
|
|
68
|
-
|
|
69
|
-
crop_x
|
|
70
|
-
default: ``0``
|
|
71
|
-
|
|
72
|
-
rop the loaded image at this x coordinate. Supports :doc:`/units`
|
|
73
|
-
|
|
74
|
-
crop_y
|
|
75
|
-
default: ``0``
|
|
76
|
-
|
|
77
|
-
rop the loaded image at this y coordinate. Supports :doc:`/units`
|
|
78
|
-
|
|
79
|
-
crop_corner_radius
|
|
80
|
-
default: ``0``
|
|
81
|
-
|
|
82
|
-
Radius for rounded corners, both x and y. When set, overrides crop_corner_x_radius and crop_corner_y_radius. Supports :doc:`/units`
|
|
83
|
-
|
|
84
|
-
crop_corner_x_radius
|
|
85
|
-
default: ``0``
|
|
86
|
-
|
|
87
|
-
x radius for rounded corners of cropped image. Supports :doc:`/units`
|
|
88
|
-
|
|
89
|
-
crop_corner_y_radius
|
|
90
|
-
default: ``0``
|
|
91
|
-
|
|
92
|
-
y radius for rounded corners of cropped image. Supports :doc:`/units`
|
|
93
|
-
|
|
94
|
-
crop_width
|
|
95
|
-
default: ``0``
|
|
96
|
-
|
|
97
|
-
width of the cropped image. Supports :doc:`/units`
|
|
98
|
-
|
|
99
|
-
crop_height
|
|
100
|
-
default: ``0``
|
|
101
|
-
|
|
102
|
-
ive): Height of the cropped image. Supports :doc:`/units`
|
|
103
|
-
|
|
104
|
-
flip_horiztonal
|
|
105
|
-
default: ``false``
|
|
106
|
-
|
|
107
|
-
Flip this image about its center horizontally (i.e. left becomes right and vice versa).
|
|
108
|
-
|
|
109
|
-
flip_vertical
|
|
110
|
-
default: ``false``
|
|
111
|
-
|
|
112
|
-
Flip this image about its center verticall (i.e. top becomes bottom and vice versa).
|
|
113
|
-
|
|
114
|
-
.. include:: /args/range.rst
|
|
115
|
-
.. include:: /args/layout.rst
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Examples
|
|
119
|
-
--------
|
data/docs/dsl/text.rst
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
text
|
|
2
|
-
====
|
|
3
|
-
|
|
4
|
-
Renders a string at a given location, width, alignment, font, etc.
|
|
5
|
-
|
|
6
|
-
Unix newlines are interpreted even on Windows (i.e. ``"\n"``).
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Options
|
|
10
|
-
-------
|
|
11
|
-
.. include:: /args/expansion.rst
|
|
12
|
-
|
|
13
|
-
str
|
|
14
|
-
default: ``''``
|
|
15
|
-
|
|
16
|
-
the string to be rendered. Must support ``#to_s``.
|
|
17
|
-
|
|
18
|
-
font
|
|
19
|
-
default: ``'Arial 36'``
|
|
20
|
-
|
|
21
|
-
the Font description string, including family, styles, and size. (e.g. ``'Arial bold italic 12'``). For the official documentation, see the `Pango font string docs <http://ruby-gnome2.sourceforge.jp/hiki.cgi?Pango%3A%3AFontDescription#style>`_. This `description <http://www.pygtk.org/pygtk2reference/class-pangofontdescription.html>`_ is also quite good.
|
|
22
|
-
|
|
23
|
-
font_size
|
|
24
|
-
default: ``nil``
|
|
25
|
-
|
|
26
|
-
an override of font string description (i.e. ``font``).
|
|
27
|
-
|
|
28
|
-
.. include:: /args/xy.rst
|
|
29
|
-
|
|
30
|
-
markup:
|
|
31
|
-
default: ``false``
|
|
32
|
-
|
|
33
|
-
When set to true, various extra styles are allowed. See :ref:`Markup <text-markup>`.
|
|
34
|
-
|
|
35
|
-
width
|
|
36
|
-
default: ``:auto``
|
|
37
|
-
|
|
38
|
-
the width of the box the string will be placed in. Stretches to the content by default.. Supports :doc:`/units`.
|
|
39
|
-
|
|
40
|
-
height
|
|
41
|
-
default: ``:auto``
|
|
42
|
-
|
|
43
|
-
the height of the box the string will be placed in. Stretches to the content by default. Supports :doc:`/units`.
|
|
44
|
-
|
|
45
|
-
wrap
|
|
46
|
-
default: ``:word_char``
|
|
47
|
-
|
|
48
|
-
when ``width`` is set, determines the behavior of how the string wraps. The ``:word_char`` option will break at words, but then fall back to characters when the word cannot fit. Options are ``:none``, ``:word``, ``:char``, ``:word_char``. Also: ``true`` is the same as ``:word_char``, ``false`` is the same as ``:none``.
|
|
49
|
-
|
|
50
|
-
spacing
|
|
51
|
-
default: ``0``
|
|
52
|
-
|
|
53
|
-
Adjust the spacing when the text is multiple lines. No effect when the text does not wrap.
|
|
54
|
-
|
|
55
|
-
align
|
|
56
|
-
default: ``:left``
|
|
57
|
-
|
|
58
|
-
The alignment of the text. [:left, right, :center]
|
|
59
|
-
|
|
60
|
-
justify
|
|
61
|
-
default: ``false``
|
|
62
|
-
|
|
63
|
-
toggles whether or not the text is justified or not.
|
|
64
|
-
|
|
65
|
-
valign
|
|
66
|
-
default: ``:top``
|
|
67
|
-
|
|
68
|
-
When width and height are set, align text vertically according to the ink extents of the text. [:top, :middle, :bottom]
|
|
69
|
-
|
|
70
|
-
ellipsize
|
|
71
|
-
default: ``:end``
|
|
72
|
-
|
|
73
|
-
When width and height are set, determines the behavior of overflowing text. Also: `true` maps to `:end` and `false` maps to `:none`. Default `:end` [:none, :start, :middle, :end, true, false]. Also, as mentioned in :doc:`/config`, if text is ellipsized a warning is thrown.
|
|
74
|
-
|
|
75
|
-
angle
|
|
76
|
-
default: ``0``
|
|
77
|
-
|
|
78
|
-
Rotation of the text in radians. Note that this rotates around the upper-left corner of the text box, making the placement of x-y coordinates slightly tricky.
|
|
79
|
-
|
|
80
|
-
stroke_width
|
|
81
|
-
default: ``0.0``
|
|
82
|
-
|
|
83
|
-
the width of the outside stroke. Supports :doc:`/units`, see {file:README.md#Units Units}.
|
|
84
|
-
|
|
85
|
-
stroke_color
|
|
86
|
-
default: ``:black``
|
|
87
|
-
|
|
88
|
-
the color with which to stroke the outside of the rectangle. {file:README.md#Specifying_Colors___Gradients Specifying Colors & Gradients}
|
|
89
|
-
|
|
90
|
-
stroke_strategy
|
|
91
|
-
default: ``:fill_first``
|
|
92
|
-
|
|
93
|
-
specify whether the stroke is done before (thinner) or after (thicker) filling the shape. [:fill_first, :stroke_first]
|
|
94
|
-
|
|
95
|
-
dash
|
|
96
|
-
default: ``''``
|
|
97
|
-
|
|
98
|
-
define a dash pattern for the stroke. Provide a string with space-separated numbers that define the pattern of on-and-off alternating strokes, measured in pixels by defautl. Supports :doc:`/units` (e.g. ``'0.02in 0.02in'``).
|
|
99
|
-
|
|
100
|
-
hint
|
|
101
|
-
default: ``:nil`` (i.e. no hint)
|
|
102
|
-
|
|
103
|
-
draw a rectangle around the text with the given color. Overrides global hints (see {Deck#hint}).
|
|
104
|
-
|
|
105
|
-
color
|
|
106
|
-
default: [String] (:black) the color the font will render to. Gradients supported. See {file:README.md#Specifying_Colors___Gradients Specifying Colors}
|
|
107
|
-
|
|
108
|
-
.. include:: /args/draw.rst
|
|
109
|
-
.. include:: /args/range.rst
|
|
110
|
-
.. include:: /args/layout.rst
|
|
111
|
-
|
|
112
|
-
.. _text-markup:
|
|
113
|
-
|
|
114
|
-
Markup
|
|
115
|
-
------
|
|
116
|
-
|
|
117
|
-
If you want to do specialized formatting within a given string, Squib has lots of options. By setting ``markup: true``, you enable tons of text processing. This includes:
|
|
118
|
-
|
|
119
|
-
* Pango Markup. This is an HTML-like formatting language that specifies formatting inside your string. Pango Markup essentially supports any formatting option, but on a letter-by-letter basis. Such as: font options, letter spacing, gravity, color, etc. See the `Pango markup docs <https://developer.gnome.org/pango/stable/PangoMarkupFormat.html>`_ for details.
|
|
120
|
-
* Quotes are converted to their curly counterparts where appropriate.
|
|
121
|
-
* Apostraphes are converted to curly as well.
|
|
122
|
-
* LaTeX-style quotes are explicitly converted (````like this''``)
|
|
123
|
-
* Em-dash and en-dash are converted with triple and double-dashes respectively (``--`` is an en-dash, and ``---`` becomes an em-dash.)
|
|
124
|
-
* Ellipses can be specified with ``...`` (three periods). Note that this is entirely different from the ``ellipsize`` option (which determines what to do with overflowing text).
|
|
125
|
-
|
|
126
|
-
A few notes:
|
|
127
|
-
* Smart quoting assumes the UTF-8 character set by default. If you are in a different character set and want to change how it behaves
|
|
128
|
-
* Pango markup uses an XML/HTML-ish processor. Some characters require HTML-entity escaping (e.g. ``&`` for ``&``)
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
You can also disable the auto-quoting mechanism by setting ``smart_quotes: false`` in your config. Explicit replacements will still be performed. See :doc:`/config`
|
|
132
|
-
|
|
133
|
-
Embedded Icons
|
|
134
|
-
--------------
|
|
135
|
-
|
|
136
|
-
The ``text`` method will also respond to a block. The object that gets passed to this block allows for embedding images into the flow of your text. The following methods are supported::
|
|
137
|
-
|
|
138
|
-
text(str: 'Take 1 :tool: and gain 2 :health:') do |embed|
|
|
139
|
-
embed.svg key: ':tool:', file: 'tool.svg'
|
|
140
|
-
embed.png key: ':health:', file: 'health.png'
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
embed.svg
|
|
144
|
-
^^^^^^^^^
|
|
145
|
-
.. include:: /args/expansion.rst
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
key
|
|
149
|
-
default: ``'*'``
|
|
150
|
-
|
|
151
|
-
the string to replace with the graphic. Can be multiple letters, e.g. ``':tool:'``
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
file
|
|
155
|
-
default: ``''``
|
|
156
|
-
|
|
157
|
-
file(s) to read in, relative to the root directory or ``img_dir`` if set in the config.
|
|
158
|
-
|
|
159
|
-
id
|
|
160
|
-
default: ``nil``
|
|
161
|
-
|
|
162
|
-
if set, then only render the SVG element with the given id. Prefix '#' is optional. Note: the x-y coordinates are still relative to the SVG document's page.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
force_id
|
|
166
|
-
default: ``false``
|
|
167
|
-
|
|
168
|
-
if set, then this svg will not be rendered at all if the id is empty or nil. If not set, the entire SVG is rendered.
|
|
169
|
-
|
|
170
|
-
layout
|
|
171
|
-
default: ``nil``
|
|
172
|
-
|
|
173
|
-
entry in the layout to use as defaults for this command. See :doc:`/layouts`
|
|
174
|
-
|
|
175
|
-
width
|
|
176
|
-
default: ``:native``
|
|
177
|
-
|
|
178
|
-
the width of the image rendered. Does not support ``:scale`` (`yet <https://github.com/andymeneely/squib/issues/160>`_)
|
|
179
|
-
|
|
180
|
-
height
|
|
181
|
-
default: ``:native``
|
|
182
|
-
|
|
183
|
-
the height the height of the image rendered. Does not support ``:scale`` (`yet <https://github.com/andymeneely/squib/issues/160>`_)
|
|
184
|
-
|
|
185
|
-
dx
|
|
186
|
-
default: ``0``
|
|
187
|
-
|
|
188
|
-
"delta x", or adjust the icon horizontally by x pixels
|
|
189
|
-
|
|
190
|
-
dy
|
|
191
|
-
default: ``0``
|
|
192
|
-
|
|
193
|
-
"delta y", or adjust the icon vertically by y pixels
|
|
194
|
-
|
|
195
|
-
flip_horiztonal
|
|
196
|
-
default: ``false``
|
|
197
|
-
|
|
198
|
-
Flip this image about its center horizontally (i.e. left becomes right and vice versa).
|
|
199
|
-
|
|
200
|
-
flip_vertical
|
|
201
|
-
default: ``false``
|
|
202
|
-
|
|
203
|
-
Flip this image about its center verticall (i.e. top becomes bottom and vice versa).
|
|
204
|
-
|
|
205
|
-
alpha
|
|
206
|
-
default: ``1.0``
|
|
207
|
-
|
|
208
|
-
the alpha-transparency percentage used to blend this image.
|
|
209
|
-
|
|
210
|
-
angle
|
|
211
|
-
default: ``0``
|
|
212
|
-
|
|
213
|
-
rotation of the in radians. Note that this rotates around the upper-left corner, making the placement of x-y coordinates slightly tricky.
|
|
214
|
-
|
|
215
|
-
embed.png
|
|
216
|
-
^^^^^^^^^
|
|
217
|
-
|
|
218
|
-
.. include:: /args/expansion.rst
|
|
219
|
-
|
|
220
|
-
key
|
|
221
|
-
default: ``'*'``
|
|
222
|
-
|
|
223
|
-
the string to replace with the graphic. Can be multiple letters, e.g. ``':tool:'``
|
|
224
|
-
|
|
225
|
-
file
|
|
226
|
-
default: ``''``
|
|
227
|
-
|
|
228
|
-
file(s) to read in, relative to the root directory or ``img_dir`` if set in the config.
|
|
229
|
-
|
|
230
|
-
layout
|
|
231
|
-
default: ``nil``
|
|
232
|
-
|
|
233
|
-
entry in the layout to use as defaults for this command. See :doc:`/layouts`
|
|
234
|
-
|
|
235
|
-
width
|
|
236
|
-
default: ``:native``
|
|
237
|
-
|
|
238
|
-
the width of the image rendered.
|
|
239
|
-
|
|
240
|
-
height
|
|
241
|
-
default: ``:native``
|
|
242
|
-
|
|
243
|
-
the height the height of the image rendered.
|
|
244
|
-
|
|
245
|
-
dx
|
|
246
|
-
default: ``0``
|
|
247
|
-
|
|
248
|
-
"delta x", or adjust the icon horizontally by x pixels
|
|
249
|
-
|
|
250
|
-
dy
|
|
251
|
-
default: ``0``
|
|
252
|
-
|
|
253
|
-
"delta y", or adjust the icon vertically by y pixels
|
|
254
|
-
|
|
255
|
-
flip_horiztonal
|
|
256
|
-
default: ``false``
|
|
257
|
-
|
|
258
|
-
Flip this image about its center horizontally (i.e. left becomes right and vice versa).
|
|
259
|
-
|
|
260
|
-
flip_vertical
|
|
261
|
-
default: ``false``
|
|
262
|
-
|
|
263
|
-
Flip this image about its center verticall (i.e. top becomes bottom and vice versa).
|
|
264
|
-
|
|
265
|
-
alpha
|
|
266
|
-
default: ``1.0``
|
|
267
|
-
|
|
268
|
-
the alpha-transparency percentage used to blend this image.
|
|
269
|
-
|
|
270
|
-
blend
|
|
271
|
-
default: ``:none``
|
|
272
|
-
|
|
273
|
-
the composite blend operator used when applying this image. See Blend Modes at http://cairographics.org/operators.
|
|
274
|
-
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.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
mask
|
|
278
|
-
default: ``nil``
|
|
279
|
-
|
|
280
|
-
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.
|
|
281
|
-
|
|
282
|
-
angle
|
|
283
|
-
default: ``0``
|
|
284
|
-
|
|
285
|
-
rotation of the in radians. Note that this rotates around the upper-left corner, making the placement of x-y coordinates slightly tricky.
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
Examples
|
|
290
|
-
--------
|
|
291
|
-
|
|
292
|
-
See :doc:`/text_feature`.
|
data/docs/dsl/triangle.rst
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
triangle
|
|
2
|
-
--------
|
|
3
|
-
|
|
4
|
-
Draw a triangle at the given coordinates.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
^^^^^^^
|
|
8
|
-
.. include:: /args/expansion.rst
|
|
9
|
-
|
|
10
|
-
x1
|
|
11
|
-
default: ``100``
|
|
12
|
-
|
|
13
|
-
the first x-coordinate to place. Supports :doc:`/units/`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
y1
|
|
17
|
-
default: ``100``
|
|
18
|
-
|
|
19
|
-
the first y-coordinate to place. Supports :doc:`/units/`
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
x2
|
|
23
|
-
default: ``150``
|
|
24
|
-
|
|
25
|
-
the second x-coordinate to place. Supports :doc:`/units/`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
y2
|
|
29
|
-
default: ``150``
|
|
30
|
-
|
|
31
|
-
the second y-coordinate to place. Supports :doc:`/units/`
|
|
32
|
-
|
|
33
|
-
x3
|
|
34
|
-
default: ``100``
|
|
35
|
-
|
|
36
|
-
the third x-coordinate to place. Supports :doc:`/units/`
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
y3
|
|
40
|
-
default: ``150``
|
|
41
|
-
|
|
42
|
-
the third y-coordinate to place. Supports :doc:`/units/`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
.. include:: /args/draw.rst
|
|
46
|
-
.. include:: /args/range.rst
|
|
47
|
-
.. include:: /args/layout.rst
|
|
48
|
-
|
|
49
|
-
Examples
|
|
50
|
-
^^^^^^^^
|