drawinglayer/source/processor2d/vclpixelprocessor2d.cxx  |    4 +++-
 svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx |   13 +++++++------
 svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx        |   13 +++++++------
 3 files changed, 17 insertions(+), 13 deletions(-)

New commits:
commit 99c337d1d3831ce9d2c7dc1cbff713f4ac49d6ac
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu May 7 08:03:22 2020 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu May 7 23:12:41 2020 +0200

    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.kagan...@collabora.com>

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 6c14c09c1a19..cb0e3124b19d 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -975,7 +975,9 @@ void VclPixelProcessor2D::processGlowPrimitive2D(const 
primitive2d::GlowPrimitiv
         BitmapFilter::Filter(mask, BitmapFilterStackBlur(fBlurRadius));
 
         // The end result is the bitmap filled with glow color and blurred 
8-bit alpha mask
-        bitmap.Erase(rCandidate.getGlowColor());
+        const basegfx::BColor aGlowColor(
+            
maBColorModifierStack.getModifiedColor(rCandidate.getGlowColor().getBColor()));
+        bitmap.Erase(Color(aGlowColor));
         // alpha mask will be scaled up automatically to match bitmap
         BitmapEx result(bitmap, AlphaMask(mask.GetBitmap()));
 
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());
         }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to