Commit Graph

45 Commits (4ae06d2e592634ba0f6ccc0f300cd61dd659e5a2)

Author SHA1 Message Date
Andy Meneely c267e1dda7 spec: rip out flaky mock object test 2017-01-03 12:07:04 -05:00
Andy Meneely 30395aee56 save_pdf: add crop marks
Should satisfy #123

Needs some testing on printers but the functionality is there.
2016-11-01 12:12:03 -04:00
Andy Meneely ee2ed28550 text: rewrite embedding to use set_shape_renderer
No more arcane unicode magic!

Closes #177

Related to #170, #171, #158, #103, and #153 too.
2016-09-15 15:19:56 -04:00
Andy Meneely 2329a069d1 save_pdf: flush to file
Fixes #150
2016-03-29 13:37:13 -04:00
Andy Meneely 65a0fdfd47 👮 leading space in comments 2016-03-17 23:47:32 -04:00
Andy Meneely 0f5b7d0f8e 👮 space inside parens 2016-03-17 23:42:09 -04:00
Andy Meneely 8a9552126c 👮 fix space after comma 2016-03-17 23:22:16 -04:00
Andy Meneely cf736db067 Maintain coordinate system when using gradients
Sample: document this better
spec: test this and update past tests

Fixes #127
2016-01-10 20:30:30 -05: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 3f2b057466 Convert save_sheet and save_pdf to args classes 2015-08-14 23:56:03 -04:00
Andy Meneely 70a5f48bda Add nil check for colors, just in case
Probably not possible, but provides a more descriptive error than before anyway.

Fixes #84.
2015-07-21 21:37:54 -04:00
Andy Meneely 04ac3f730a Fix mock object tests 2015-07-21 20:44: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 c5e00f1877 Employing the new args refactoring on all shapes 2015-06-11 16:16:08 -04:00
Andy Meneely c1e410fe72 First foray into args class refactoring: rect
So far, I really like this approach. It allows us to push validation logic out of the Card class and into its own set of classes that can be more easily tested.

Fixes #75, but we've got a lot more work to do in getting this full scale
2015-06-08 13:36:23 -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 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 923f346575 Redesigning how config files are read, stored, and delegated
With the new design, we take the load off of deck.rb and simply delegate methods over to the new conf.rb. This means that things like `antialias` is now available as a method to the normal Squib scripts for easy checking (without being mutable). Squib::Conf also handles parsing and defaults, and any potential input validation we need to do in the future.

Typographer is also set up now as a deck-wide configuration. This may change in the future if we want typography customization per-command, although that seems like a strange use case.

Lots of tests for this one, and lots of cross-cutting concerns in this commit.

This commit also includes some tweaks to rspec tests, including tagging of slow tests for a `rake spec_fastonly`

Conflicts:
	spec/samples/samples_regression_spec.rb
	spec/spec_helper.rb
	squib.sublime-project
2015-04-28 20:31:53 -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 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
Andy Meneely c9f9235be7 Attempting travis fix by saving and restoring the matrix 2015-04-02 10:00:26 -04:00
Andy Meneely 574b76873e Updating regression tests, renamed bezier curve params 2015-03-26 19:50:12 -04:00
Andy Meneely cb33e8a40e Updating unit tests 2015-03-19 00:24:52 -04:00
Andy Meneely 2caacaeece Fixing compatibility with linux os
Thank you, Travis! Turns out the cairo gem isn't perfectly the same in Linux...
2015-02-28 21:39:26 -05:00
Andy Meneely f49bff2388 Add antialias config option
Closes #41
2015-02-28 19:34:46 -05:00
Andy Meneely 612c042d52 SVG backend: PDF implemented, tests passing
Wrapping up the svg backend work

Still some bugs to stamp out, but this is getting close to release ready.
2015-02-24 22:33:32 -05:00
Andy Meneely 8876b27473 Merging in svg back end work. All but save_doc is done. 2015-02-20 22:56:07 -05:00
Andy Meneely a9d6ffda75 Refactoring specs, now with less leakage! 2015-02-13 13:35:38 -05:00
Andy Meneely 578c3cb6a0 Upgrading rspec, fixing mock objects bug 2015-02-13 13:26:22 -05:00
Andy Meneely d2543473c7 Fix a leftover x,y stroke on circles
Fixes #35
2015-02-13 12:54:19 -05:00
Andy Meneely 7a53f68393 Implementing mask feature for images
Fixes #32.
2015-02-01 23:04:39 -05:00
Andy Meneely bfbf7a7eba Added support for linear and radial gradients
Closes #29
2015-01-26 22:22:09 -05:00
Andy Meneely c287e6137c Unit conversion feature added, tested, documented 2014-12-30 13:35:28 -05:00
Andy Meneely f8f65f3de7 Support png scaling, but warns on use. 2014-12-09 22:59:49 -05:00
Andy Meneely d5181302ad Implementing ink extent return values 2014-11-25 00:30:28 -05:00
Andy Meneely d4f0105785 Image rotation support for png and svg commands
With unit tests and other refactorings
2014-11-03 22:47:06 -05:00
Andy Meneely 20600a97e6 Rotation works better now!! 2014-11-03 21:51:28 -05:00
Andy Meneely 4bdf37e4dc Some more tests to round out the coverage 2014-11-03 09:08:12 -05:00
Andy Meneely c52c22ddb5 New mock specs for shapes and save 2014-11-02 20:55:23 -05:00
Andy Meneely c6e85b0e46 Refactoring to use case more, fixed build 2014-11-02 18:43:11 -05:00
Andy Meneely f4d2d759c1 Allowing strings for some inputs on text
Also writing mock object tests
2014-10-31 15:55:12 -04:00