[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - drawinglayer/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 28 11:26:58 UTC 2020
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit f2e9f7146adb64252174508025c167131131b9dd
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Sep 25 10:00:31 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Sep 28 13:26:24 2020 +0200
forward axial and radial gradient types to VCL too
VCL's drawGradient() can handle them all, at least using a fallback
algorithm. And drawinglayer doesn't know which of them are handled
directly by the VCL backend used.
A catch is that the rendering of tdf#133477 is different, so
keep using drawinglayer for the affected gradient types until somebody
fixes that.
Change-Id: I1719c67c15752c6d1c3431ddfa797ac94d039555
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103376
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
(cherry picked from commit 6965bb07bb33429a7663a3f3ebe58ed89c4327d9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103427
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 10d8e69e51fa..1cbd664d3eb1 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -238,7 +238,9 @@ GradientStyle convertGradientStyle(drawinglayer::attribute::GradientStyle eGradi
case drawinglayer::attribute::GradientStyle::Rect:
return GradientStyle::Rect;
case drawinglayer::attribute::GradientStyle::Linear:
+ return GradientStyle::Linear;
default:
+ assert(false);
return GradientStyle::Linear;
}
}
@@ -901,8 +903,13 @@ GradientStyle convertGradientStyle(drawinglayer::attribute::GradientStyle eGradi
{
const attribute::FillGradientAttribute& rFillGradient = rPrimitive.getFillGradient();
- if (rFillGradient.getSteps() > 0
- || rFillGradient.getStyle() != drawinglayer::attribute::GradientStyle::Linear)
+ // VCL should be able to handle all styles, but for tdf#133477 the VCL result
+ // is different from processing the gradient manually by drawinglayer
+ // (and the Writer unittest for it fails). Keep using the drawinglayer code
+ // until somebody founds out what's wrong and fixes it.
+ if (rFillGradient.getStyle() != drawinglayer::attribute::GradientStyle::Linear
+ && rFillGradient.getStyle() != drawinglayer::attribute::GradientStyle::Axial
+ && rFillGradient.getStyle() != drawinglayer::attribute::GradientStyle::Radial)
{
process(rPrimitive);
return;
More information about the Libreoffice-commits
mailing list