diff --git a/CHANGELOG.md b/CHANGELOG.md index b6b8ca3..f729c3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Squib follows [semantic versioning](http://semver.org). Features: * `circle` method now supports various `arc` options, so you can draw partial circles (#211) by @sparr +* `save_sheet` method now supports `rtl` or "right-to-left", for easier duplex printing of backs (#204, #208) by @sparr Special thanks to @sparr for all of his work!! diff --git a/samples/saves/_saves.rb b/samples/saves/_saves.rb index ac98a86..8a566af 100644 --- a/samples/saves/_saves.rb +++ b/samples/saves/_saves.rb @@ -42,4 +42,10 @@ Squib::Deck.new(width: 825, height: 1125, cards: 16) do range: 0..5, columns: 2, rows: 2, margin: 75, gap: 5, trim: 37 + + # Sheets can arrange left-to-right and right-to-left + save_sheet prefix: 'save_sheet_rtl_', + range: 0..1, rtl: true, + columns: 2, rows: 1, + margin: 75, gap: 5, trim: 37 end diff --git a/samples/saves/save_sheet_rt1_00_expected.png b/samples/saves/save_sheet_rt1_00_expected.png new file mode 100644 index 0000000..d2998f2 Binary files /dev/null and b/samples/saves/save_sheet_rt1_00_expected.png differ diff --git a/spec/data/samples/saves/_saves.rb.txt b/spec/data/samples/saves/_saves.rb.txt index 2533d42..c9a6400 100644 --- a/spec/data/samples/saves/_saves.rb.txt +++ b/spec/data/samples/saves/_saves.rb.txt @@ -1719,6 +1719,15 @@ cairo: paint([]) cairo: set_source([MockDouble, 180, 75]) cairo: paint([]) surface: write_to_png(["_output/save_sheet_range_01.png"]) +cairo: set_source([MockDouble, -37, -37]) +cairo: paint([]) +cairo: set_source([MockDouble, 767, 75]) +cairo: paint([]) +cairo: set_source([MockDouble, -37, -37]) +cairo: paint([]) +cairo: set_source([MockDouble, 662, 75]) +cairo: paint([]) +surface: write_to_png(["_output/save_sheet_rtl_00.png"]) surface: finish([]) surface: finish([]) surface: finish([])