summaryrefslogtreecommitdiffstats
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-09-23 16:55:19 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-09-23 17:48:59 +0200
commit00fa364a2403dc23a786d3f91fde06e10b3a4a9a (patch)
treecae255dd2a5e44fb6e9b41e2d32f2b3650e76c8d /include/drawinglayer
parentReorder the internal ZF_STANDARD_DATETIME offsets to a more logical sequence (diff)
downloadcore-00fa364a2403dc23a786d3f91fde06e10b3a4a9a.tar.gz
core-00fa364a2403dc23a786d3f91fde06e10b3a4a9a.zip
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. Change-Id: I63560e3a73473c70157ecee8365ec7154217f269 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122532 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx12
-rw-r--r--include/drawinglayer/primitive2d/shadowprimitive2d.hxx8
2 files changed, 8 insertions, 12 deletions
diff --git a/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx b/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx
index c09635c6d60d..c67c3262ec1c 100644
--- a/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx
+++ b/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx
@@ -67,8 +67,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
@@ -103,9 +104,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 d388eaf1b90d..7df83a395f19 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;
};