Commit Graph

84 Commits (6caf2e1af4fb63d7c793cde0565d0812797a34b7)

Author SHA1 Message Date
Andy Meneely 87fd3b7b6f samples: update regression test 2016-04-12 13:39:29 -04:00
Andy Meneely 43ab4b0ae8 samples: gistify colors 2016-04-12 00:04:53 -04:00
Andy Meneely 8cd651d5f1 samples: gistifying excel.rb and csv.rb 2016-04-11 22:30:32 -04:00
Andy Meneely bd5e6c92f6 samples: gistify saves 2016-04-11 21:33:15 -04:00
Andy Meneely dd32e3bfae samples: cleanup regression tests 2016-04-11 21:13:34 -04:00
Andy Meneely 2329a069d1 save_pdf: flush to file
Fixes #150
2016-03-29 13:37:13 -04:00
Andy Meneely 8b0067546f save_png: add trim and trim_radius options
Close #122.
2015-12-11 23:09:04 -05:00
Andy Meneely b00cc99dd0 Added a grid shape
Close #68
2015-10-26 23:59:51 -04:00
Andy Meneely d99e840ffd PNG/SVG: flipping is now supported.
Fixes #11
2015-10-26 23:31:16 -04:00
Andy Meneely 8ea553eb95 Updating specs for image cropping
Ripped out graphics_images_spec.rb for being annoyingly useless. Too many mock objects!
2015-10-26 22:52:21 -04:00
Andy Meneely 541c8d49ca Crop PNGs, now with more rounded corners!
Contributes to #11
2015-10-26 22:35:56 -04:00
Andy Meneely 08381b86f0 Add quantity explosion to xlsx and csv
Closes #78
2015-10-20 18:23:25 -04:00
Andy Meneely c8e6f9803c xlsx,csv: trim whitespace, yield to optional block
Closes #108 and #79
2015-10-13 10:37:49 -04:00
Andy Meneely 4d1661ac0b Convert hand method to args classes 2015-08-15 00:17:29 -04:00
Andy Meneely bcc6d355d2 Convert showcase to args classes 2015-08-14 21:08:11 -04:00
Andy Meneely 40ac6d2b6b Expanding the Working With Text section
[skip ci]
2015-07-29 12:20:35 -04:00
Andy Meneely 7de39618fe Update regression tests for text 2015-07-28 09:39:21 -04:00
Andy Meneely 19767c54c4 Implement stroke_strategy option for all drawing operations
Fixes #102
2015-07-27 22:55:49 -04:00
Andy Meneely e03a97ce7e Add :scale shortcut to width/height of png and svg
Allows scaling while keeping the aspect ratio

Closes #91
2015-07-27 13:25:12 -04:00
Andy Meneely 7c756e468d Remove dead code 2015-07-26 23:34:02 -04:00
Andy Meneely 8f977f5956 Update text_options.rb sample, and expected output 2015-07-26 23:25:43 -04:00
Andy Meneely 9d475995e8 Pango scaling of "spacing" in text is done once
Spacing also defaults to nil, not zero, as before

Fixes #98
2015-07-26 22:26:42 -04:00
Andy Meneely f21e9448e1 Warn when text is ellipsized
Closes #80
2015-07-21 21:31:50 -04:00
Andy Meneely e20c644a9a Implemented new args design for svg and png
As part of that implementation, text_embed now supports singleton expansion. Closes #54
2015-07-21 20:27:15 -04:00
Andy Meneely ff3d057d49 Add a force_id: true example to load_images 2015-07-21 20:17:08 -04:00
Andy Meneely e43f68d323 Ported text command over to the new args classes
* Involved a big rewrite of arg_loader to accomodate nil and false better. Sadly this meant dumping ||= for if-statements. Blech, but works.
  * Updates to regression tests are pretty trivial.
  * Removed graphics_text_spec because, even though it looks useful, with rake sanity it really isn't.
  * Exposed font on deck as well

Cleaned up graphics/text.rb too!
2015-07-07 23:59:23 -04:00
Andy Meneely cc5c540be8 Updated regression specs
Mostly from changing colorify to always converting to a string
New ranges example for the idiom
New text options example for dotted

[skip ci]
2015-07-03 20:16:18 -04:00
Andy Meneely 6aecdbbb4a Adding custom colors to the draw arg 2015-07-03 00:47:46 -04:00
Andy Meneely c5e00f1877 Employing the new args refactoring on all shapes 2015-06-11 16:16:08 -04:00
Andy Meneely 12c5cd675b Added line cap and join settings for rect and curve
More forthcoming - these are proof-of-concept
2015-06-08 14:17:46 -04:00
Andy Meneely 6c60f21bb0 Refactored drawing to get fill_n_stroke
Contributes to #75
2015-06-04 16:40:55 -04:00
Andy Meneely 3bbc787025 Add polygon method to dsl
Testing and documentation too.

Closes #67
2015-05-22 06:12:48 -04:00
Andy Meneely 0853b6a708 Finish regression testing of star 2015-05-21 18:29:38 -04:00
Andy Meneely a86974d5b8 Regression and sanity testing 2015-05-19 15:02:54 -04:00
Andy Meneely dab544a53b Add ellipse method
Also experimenting with using stroke_preserve, which in turn may make the other methods less repetitive.

Closes #66
2015-04-30 11:48:21 -04:00
Andy Meneely ac7769237c Fix the csv_import.rb sample to function properly 2015-04-30 10:05:34 -04:00
Andy Meneely 71defb9e33 Fix color handling with text outline stroking
Needed to set squibcolor prior to translating the coordinate system so that gradients are relative to the card (as is documented). This also means stroking is done AFTER drawing the text, which looks better anyway.
2015-04-30 09:54:41 -04:00
Andy Meneely e974880e03 Add 'data' field to svg method for loading XML directly
Implements #65
2015-04-29 16:49:38 -04:00
Andy Meneely 7c69cad506 Text: outline a string with a color or gradient
Fill color is still the same with 'color' (i.e. can be overridden by markup still), but now there's a stroke_width and a stroke_color option that, when stroke_width > 0, will draw an outline below the text. Since this isn't a Pango feature, we can't do markup for outlines. (Maybe make that a feature request to Pango if you want it.)

Implements #51
2015-04-28 22:27:26 -04:00
Andy Meneely 035cd6259e Fix global hinting logic
Fixes #63
2015-04-16 21:24:21 -04:00
Andy Meneely 4a0c5e78b6 Fix PDF scaling issue
Properly compute the size of the PDF based on DPI and PDF-specific resolution (i.e. 72dpi).

Closes #62
2015-04-13 22:59:34 -04:00
Andy Meneely 0185f2dfcf Fixing up regression tests for release 2015-04-13 21:33:55 -04:00
Andy Meneely 0616512bd6 Set font antialiasing from global antialiasing
This is a workaround until we get a proper solution in #59
2015-04-13 21:26:41 -04:00
Andy Meneely 063d5156d6 Allow configuration of typographical replacements, e.g. smart quotes
If you're living in a non-UTF-8 character set, then you can configure what quotes are smartly changed.
If my regexes are messing things up, you can also turn this off with smart_quotes: false
Also updated docs.

This closes #50
2015-04-07 21:21:00 -04:00
Andy Meneely beb46a9e1c Place embedded icons based on byte offset
Fixes #57
2015-04-07 19:43:16 -04:00
Andy Meneely 211e7c13b3 Fix typography replacements with embeds
Enable embedded icons tests again
2015-04-07 12:20:40 -04:00
Andy Meneely a5d1cb60f2 Complete overhaul of smart quotes to "typographer"
See README for details

Contributes to #50
2015-04-07 00:16:06 -04:00
Andy Meneely 674397c005 Smart quotes!
Closes #50
2015-04-04 16:02:20 -04:00
Andy Meneely 19cad2cdb8 Using a platform-specific fix for zero-width letters on embedding icons
Contributes to #30 and our zero-width letter woes.
2015-04-04 09:15:21 -04:00
Andy Meneely 91ba48f80b Explicitly saving and restoring the matrix 2015-04-02 10:14:08 -04:00