diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-02-24 19:21:42 +0100 |
---|---|---|
committer | Xisco Faulí <anistenis@gmail.com> | 2016-02-25 08:42:37 +0000 |
commit | b914d4a70f4955dc15af3c18b61b0a75e1ed5357 (patch) | |
tree | 4eea6b0a6bf5c1539785b324161edcd65ff9e682 /svgio | |
parent | baabbe56a5592e139e2897927be808782fbe681d (diff) |
Partially revert b6a62f07557fe4ae0931e0f3e0f306d2f69b116b
it has been fixed by 423b79e7366203db3f57dea75b8cb9eb852b5614
in a better way
Change-Id: Ia3192071f00522ac111d3e95e4dc05dc57a6267e
Reviewed-on: https://gerrit.libreoffice.org/22677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index fb750fe9933b..56a1ac5235eb 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -263,9 +263,6 @@ namespace svgio // dismantle to geometry and add needed primitives const basegfx::BColor* pFill = getFill(); const SvgGradientNode* pFillGradient = getSvgGradientNodeFill(); - const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); - const SvgGradientNode* pParentFillGradient = - pSvgStyleAttributes ? pSvgStyleAttributes->getSvgGradientNodeFill() : nullptr; const SvgPatternNode* pFillPattern = getSvgPatternNodeFill(); const basegfx::BColor* pStroke = getStroke(); const SvgGradientNode* pStrokeGradient = getSvgGradientNodeStroke(); @@ -306,20 +303,20 @@ namespace svgio const bool bStrokeUsed(pStroke || pStrokeGradient || pStrokePattern); - if(pFill && (!pFillGradient || pParentFillGradient)) - { - // add the already prepared primitives for single color fill - rTarget.append(rSource); - } // add fill. Use geometry even for simple color fill when stroke // is used, else text rendering and the geometry-based stroke will // normally not really match optically due to diverse system text // renderers - else if(aMergedArea.count() && (pFillGradient || pFillPattern || bStrokeUsed)) + if(aMergedArea.count() && (pFillGradient || pFillPattern || bStrokeUsed)) { // create text fill content based on geometry add_fill(aMergedArea, rTarget, aMergedArea.getB2DRange()); } + else if(pFill) + { + // add the already prepared primitives for single color fill + rTarget.append(rSource); + } // add stroke if(aMergedArea.count() && bStrokeUsed) |