Flip options for sprues (#251) (#277)

* Flipping works, now just need new argument

* Finishing up

* New test data
This commit is contained in:
Andy Meneely
2019-06-07 15:23:15 -04:00
committed by GitHub
parent a40c4d7dc4
commit cb66d7c31d
13 changed files with 62 additions and 15 deletions
+4 -3
View File
@@ -1,4 +1,5 @@
require 'squib'
# require 'squib'
require_relative '../../lib/squib'
# This is a more advanced example of Sprues
# (mostly so we can have a torturous regression test)
@@ -14,10 +15,10 @@ Squib::Deck.new(cards: 6, width: '2.2in', height: '2.1in') do
circle x: width/2, y: height/2, radius: 20 # midpoint
text str: (0..9).map{ |i| "Card #{i}\n\n" },
text str: (0..9).map{ |i| "Card! #{i}\n\n" },
font: 'Sans 32', align: :center, valign: :middle,
height: :deck, width: :deck
save_sheet sprue: 'my_sprues/weird_sprue.yml',
trim: '0.2in', trim_radius: '10pt',
prefix: "advanced_sprues_"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 109 KiB

+6 -2
View File
@@ -1,6 +1,6 @@
---
sheet_width: 5in
sheet_height: 4.5in
sheet_height: 6.5in
card_width: 2in
card_height: 2in
position_reference: :center
@@ -12,6 +12,10 @@ cards:
rotate: 3.14159
- x: 1.1in
y: 3.1in
flip_horizontal: true
- x: 3.1in
y: 3.1in
rotate: 2 # 2 radians?? ew.
rotate: 2 # 2 radians?? ew. (this exists to annoy anyone who digs this deep)
- x: 1.1in
y: 5.1in
flip_vertical: true