summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-09-23 16:55:19 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-27 08:27:04 +0200
commit1f8687d2261082d1a76527c41bc1010ebcf0ddd1 (patch)
tree0a269391ff1183441e30235426b64a862d073d8f /include
parent2b96bf1fd8f4287a06b79dbec14114ca6c035731 (diff)
Related: tdf#144091 svx: fix interaction of transp cell fill and transp shadow
This is a follow-up to commit 37a52d30bbfcf1d073779b50139c4dafa507be4b (tdf#144091 svx: fix unwanted blur of shadow from table cell fill, 2021-09-20), where it turned out that the original bugdoc was just a special case of almost full transparency (80%), that's why avoiding the blur fixed the problem. A more general approach instead is to multiply the alpha or the cell fill of table shapes and the alpha of the shadow itself. The end result is the same (80% transparency) for the first bugdoc, but this gives back the blur on the second bugdoc. (cherry picked from commit 00fa364a2403dc23a786d3f91fde06e10b3a4a9a) Conflicts: drawinglayer/source/primitive2d/shadowprimitive2d.cxx drawinglayer/source/processor2d/vclpixelprocessor2d.cxx include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx svx/source/sdr/primitive2d/sdrdecompositiontools.cxx Change-Id: I63560e3a73473c70157ecee8365ec7154217f269 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/drawinglayer/primitive2d/baseprimitive2d.hxx12
-rw-r--r--include/drawinglayer/primitive2d/shadowprimitive2d.hxx8
2 files changed, 8 insertions, 12 deletions
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index c4a9b650308f..f697886c1ac5 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -204,8 +204,9 @@ private:
/// a sequence used for buffering the last create2DDecomposition() result
Primitive2DContainer maBuffered2DDecomposition;
- /// When blur is invoked on a list of primitives, exclude this primitive from the blur effect.
- bool mbExcludeFromBlur = false;
+ /// When a shadow wraps a list of primitives, this primitive wants to influence the transparency
+ /// of the shadow.
+ sal_uInt16 mnTransparenceForShadow = 0;
protected:
/** access methods to maBuffered2DDecomposition. The usage of this methods may allow
@@ -240,9 +241,12 @@ public:
get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor,
const geometry::ViewInformation2D& rViewInformation) const override;
- void setExcludeFromBlur(bool bExcludeFromBlur) { mbExcludeFromBlur = bExcludeFromBlur; }
+ void setTransparenceForShadow(sal_uInt16 nTransparenceForShadow)
+ {
+ mnTransparenceForShadow = nTransparenceForShadow;
+ }
- bool getExcludeFromBlur() const { return mbExcludeFromBlur; }
+ sal_uInt16 getTransparenceForShadow() const { return mnTransparenceForShadow; }
};
} // end of namespace drawinglayer::primitive2d
diff --git a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
index 7bd223847f8d..37258d8f34ed 100644
--- a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx
@@ -76,14 +76,6 @@ namespace drawinglayer::primitive2d
/// create decomposition
virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
- void get2DDecompositionWithoutBlur(
- Primitive2DDecompositionVisitor& rVisitor,
- const geometry::ViewInformation2D& rViewInformation) const;
-
- void
- get2DDecompositionWithBlur(Primitive2DDecompositionVisitor& rVisitor,
- const geometry::ViewInformation2D& rViewInformation) const;
-
/// provide unique ID
virtual sal_uInt32 getPrimitive2DID() const override;
};