Implement stroke_strategy option for all drawing operations

Fixes #102
This commit is contained in:
Andy Meneely
2015-07-27 22:55:49 -04:00
parent 5bbde3a259
commit 19767c54c4
11 changed files with 196 additions and 27 deletions
+18 -1
View File
@@ -60,6 +60,23 @@ describe Squib::Args::Draw do
expect(draw).to have_attributes( cap: [Cairo::LINE_CAP_SQUARE] )
end
it 'allows fill_first stroke_strategy' do
args = {stroke_strategy: :FILL_first}
draw.load! args
expect(draw).to have_attributes( stroke_strategy: [:fill_first] )
end
it 'allows stroke_first stroke_strategy' do
args = {stroke_strategy: ' stroke_FIRST '}
draw.load! args
expect(draw).to have_attributes( stroke_strategy: [:stroke_first] )
end
it 'disallows anything not stroke_first and fill_first' do
args = {stroke_strategy: 'foo'}
expect { draw.load! args }.to raise_error("Only 'stroke_first' or 'fill_first' allowed")
end
context 'custom colors' do
it 'looks up custom colors in the config' do
@@ -75,4 +92,4 @@ describe Squib::Args::Draw do
end
end
end
end