SVG Importer: add support for stroke-opacity and fill-opacity.

This commit is contained in:
Jonathan Puckey 2012-11-28 20:50:27 +01:00
parent 41b2047a88
commit 808073fa63

View file

@ -401,6 +401,16 @@ new function() {
item.setOpacity(opacity);
}
break;
// http://www.w3.org/TR/SVG/painting.html#FillOpacityProperty
case 'fill-opacity':
// http://www.w3.org/TR/SVG/painting.html#StrokeOpacityProperty
case 'stroke-opacity':
var opacity = Base.toFloat(value),
color = item[name == 'fill-opacity'
? 'getFillColor' : 'getStrokeColor']();
if (color)
color.setAlpha(opacity);
break;
case 'visibility':
item.setVisible(value === 'visible');
break;