Merge commit 'acb88337f2f31104752230cdc755143211a46ec5' into next
merge in request #10
This commit is contained in:
commit
98f25e6579
1 changed files with 13 additions and 4 deletions
|
@ -525,13 +525,22 @@ var parsesvg = func(group, path, options = nil)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
parsePath(attr['d']);
|
parsePath(attr['d']);
|
||||||
|
|
||||||
stack[-1].set('fill', style['fill']);
|
var fillOpacity = style['fill-opacity'];
|
||||||
|
if( fillOpacity != nil)
|
||||||
|
stack[-1].set('fill', style['fill'] ~ sprintf("%02x", int(style['fill-opacity']*255)));
|
||||||
|
else
|
||||||
|
stack[-1].set('fill', style['fill']);
|
||||||
|
|
||||||
var w = style['stroke-width'];
|
var w = style['stroke-width'];
|
||||||
stack[-1].setStrokeLineWidth( w != nil ? evalCSSNum(w) : 1 );
|
stack[-1].setStrokeLineWidth( w != nil ? evalCSSNum(w) : 1 );
|
||||||
stack[-1].set('stroke', style['stroke'] or "none");
|
|
||||||
|
var strokeOpacity = style['stroke-opacity'];
|
||||||
|
if(strokeOpacity != nil)
|
||||||
|
stack[-1].set('stroke', (style['stroke'] ~ sprintf("%02x", int(style['stroke-opacity']*255))));
|
||||||
|
else
|
||||||
|
stack[-1].set('stroke', style['stroke'] or "none");
|
||||||
|
|
||||||
var linecap = style['stroke-linecap'];
|
var linecap = style['stroke-linecap'];
|
||||||
if( linecap != nil )
|
if( linecap != nil )
|
||||||
stack[-1].setStrokeLineCap(style['stroke-linecap']);
|
stack[-1].setStrokeLineCap(style['stroke-linecap']);
|
||||||
|
|
Loading…
Add table
Reference in a new issue