diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-09-23 16:55:19 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-27 16:15:13 +0200 |
commit | 0f99f237be9ee4135a548e255c6c8dcceba8648d (patch) | |
tree | b2b584561195c9864b6fe7f0d1e73678fd34b0a9 /svx/qa/unit | |
parent | 92adaab00003beb7314354018909e26272a245a9 (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
svx/source/table/viewcontactoftableobj.cxx
Change-Id: I63560e3a73473c70157ecee8365ec7154217f269
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122680
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/qa/unit')
-rw-r--r-- | svx/qa/unit/table.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx index 4419892a42ba..f65118e536c6 100644 --- a/svx/qa/unit/table.cxx +++ b/svx/qa/unit/table.cxx @@ -89,11 +89,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTableShadowBlur) drawinglayer::Primitive2dXmlDump aDumper; xmlDocUniquePtr pDocument = aDumper.dumpAndParse(xPrimitiveSequence); // Without the accompanying fix in place, this test would have failed with: - // - Expected: true - // - Actual : false - // i.e. blur was applied on both the cell fill and the cell border. - assertXPath(pDocument, "//shadow/transform/modifiedColor/sdrCell[1]", "excludeFromBlur", - "true"); + // - number of nodes is incorrect + // - Expected: 1 + // - Actual : 0 + // i.e. the shadow itself was not transparent and that resulted in a non-transparent rendering + // as well, while the rendering transparency should be based on the transparency of the shadow + // itself and the transparency of the cell fill. + assertXPath(pDocument, "//objectinfo/unifiedtransparence[1]", "transparence", "0.8"); } } |