summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-05-07 08:03:22 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-05-07 23:12:41 +0200
commit99c337d1d3831ce9d2c7dc1cbff713f4ac49d6ac (patch)
tree180ce025817e2eaea8ff23e9325bb7abed3c5a81 /svx/source
parenta640676e06bdab3471f5c9f04dd9403bc66ddc22 (diff)
tdf#132199: put glow before shadow, to have shadow of the glow
Also take modified color into account when drawing glow. Change-Id: Iba136d2695cb783d13ff251d087066c2e8803d63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93605 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx13
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx13
2 files changed, 14 insertions, 12 deletions
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index 804a653c86b2..378d78f5c6f6 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -52,6 +52,13 @@ namespace drawinglayer::primitive2d
getWordWrap()));
}
+ // tdf#132199: put glow before shadow, to have shadow of the glow, not the opposite
+ if (!aRetval.empty() && !getSdrSTAttribute().getGlow().isDefault())
+ {
+ // glow
+ aRetval = createEmbeddedGlowPrimitive(aRetval, getSdrSTAttribute().getGlow());
+ }
+
// add shadow
if(!aRetval.empty() && !getSdrSTAttribute().getShadow().isDefault())
{
@@ -71,12 +78,6 @@ namespace drawinglayer::primitive2d
}
}
- if(!aRetval.empty() && !getSdrSTAttribute().getGlow().isDefault())
- {
- // glow
- aRetval = createEmbeddedGlowPrimitive(aRetval, getSdrSTAttribute().getGlow());
- }
-
rContainer.insert(rContainer.end(), aRetval.begin(), aRetval.end());
}
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index 9f15f4d9fc41..2a83e5b6aeed 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -115,6 +115,13 @@ namespace drawinglayer::primitive2d
false));
}
+ // tdf#132199: put glow before shadow, to have shadow of the glow, not the opposite
+ if (!aRetval.empty() && !getSdrLFSTAttribute().getGlow().isDefault())
+ {
+ // glow
+ aRetval = createEmbeddedGlowPrimitive(aRetval, getSdrLFSTAttribute().getGlow());
+ }
+
// add shadow
if(!getSdrLFSTAttribute().getShadow().isDefault())
{
@@ -125,12 +132,6 @@ namespace drawinglayer::primitive2d
aTranslateGrf.getY());
}
- if (!aRetval.empty() && !getSdrLFSTAttribute().getGlow().isDefault())
- {
- // glow
- aRetval = createEmbeddedGlowPrimitive(aRetval, getSdrLFSTAttribute().getGlow());
- }
-
rContainer.insert(rContainer.end(), aRetval.begin(), aRetval.end());
}