diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-09-20 11:26:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-09-20 12:57:23 +0200 |
commit | 37a52d30bbfcf1d073779b50139c4dafa507be4b (patch) | |
tree | 62a54ad5e163bffdde1517b5b242a33246a570a7 /include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx | |
parent | 1a6401578ec32510342e232699889527cca914b8 (diff) |
tdf#144091 svx: fix unwanted blur of shadow from table cell fill
Initial render support for shadows of table shapes were added in commit
a75bf43a8d6c5dec6dcc86908c142ceec541aa8c (tdf#129961 svx: add rendering
for table shadow as direct format, 2020-12-02).
That already noticed a trick with the shadow of table shapes: the shadow
is generate from the cell fill and the border, but not from the text.
An additional trick is that when blur is enabled for the table shape's
shadow, then only the border should be blurred, not the cell fill.
In the bug document's case, the effective cell background was gray, with
a semi-transparent red shadow. We used to render cc0000 with blur and
cccccc without blur, now we correctly render cca3a3, matching
PowerPoint.
Change-Id: I7326a5f6254cf19b2d05181084c78e734ff7a7b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122349
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx')
-rw-r--r-- | include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx b/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx index fe3c477752a4..66bb9f29af24 100644 --- a/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx +++ b/include/drawinglayer/primitive2d/BufferedDecompositionPrimitive2D.hxx @@ -67,6 +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; + protected: /** access methods to maBuffered2DDecomposition. The usage of this methods may allow later thread-safe stuff to be added if needed. Only to be used by getDecomposition() @@ -99,6 +102,10 @@ public: virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override; + + void setExcludeFromBlur(bool bExcludeFromBlur) { mbExcludeFromBlur = bExcludeFromBlur; } + + bool getExcludeFromBlur() const { return mbExcludeFromBlur; } }; } // end of namespace drawinglayer::primitive2d |