diff options
Diffstat (limited to 'svgio/source/svgreader/svgstyleattributes.cxx')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 6c2fef789404..5d557ac10a02 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1062,7 +1062,7 @@ namespace svgio return; } - const double fOpacity(getOpacity().getNumber()); + const double fOpacity(getOpacity().solve(mrOwner)); if(basegfx::fTools::equalZero(fOpacity)) { @@ -1119,7 +1119,7 @@ namespace svgio { if(rSource.hasElements()) { - const double fOpacity(getOpacity().getNumber()); + const double fOpacity(getOpacity().solve(mrOwner)); if(basegfx::fTools::equalZero(fOpacity)) { @@ -1215,7 +1215,7 @@ namespace svgio maTextDecoration(TextDecoration_notset), maTextAnchor(TextAnchor_notset), maColor(), - maOpacity(1.0), + maOpacity(), maVisibility(Visibility_visible), maTitle(), maDesc(), @@ -2122,6 +2122,28 @@ namespace svgio return SvgNumber(1.0); } + SvgNumber SvgStyleAttributes::getOpacity() const + { + if(mbIsClipPathContent) + { + return SvgNumber(1.0); + } + else if(maOpacity.isSet()) + { + return maOpacity; + } + + const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); + + if(pSvgStyleAttributes) + { + return pSvgStyleAttributes->getOpacity(); + } + + // default is 1 + return SvgNumber(1.0); + } + FillRule SvgStyleAttributes::getFillRule() const { if(FillRule_notset != maFillRule) |