add var to fillOpacity and strokeOpacity
This commit is contained in:
parent
7b71a8f361
commit
acb88337f2
1 changed files with 3 additions and 2 deletions
|
@ -526,7 +526,7 @@ var parsesvg = func(group, path, options = nil)
|
||||||
else
|
else
|
||||||
parsePath(attr['d']);
|
parsePath(attr['d']);
|
||||||
|
|
||||||
fillOpacity = style['fill-opacity'];
|
var fillOpacity = style['fill-opacity'];
|
||||||
if( fillOpacity != nil)
|
if( fillOpacity != nil)
|
||||||
stack[-1].set('fill', style['fill'] ~ sprintf("%02x", int(style['fill-opacity']*255)));
|
stack[-1].set('fill', style['fill'] ~ sprintf("%02x", int(style['fill-opacity']*255)));
|
||||||
else
|
else
|
||||||
|
@ -534,7 +534,8 @@ var parsesvg = func(group, path, options = nil)
|
||||||
|
|
||||||
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 );
|
||||||
strokeOpacity = style['stroke-opacity'];
|
|
||||||
|
var strokeOpacity = style['stroke-opacity'];
|
||||||
if(strokeOpacity != nil)
|
if(strokeOpacity != nil)
|
||||||
stack[-1].set('stroke', (style['stroke'] ~ sprintf("%02x", int(style['stroke-opacity']*255))));
|
stack[-1].set('stroke', (style['stroke'] ~ sprintf("%02x", int(style['stroke-opacity']*255))));
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue