drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 125752096bf00069b329217ec61464ec8224c9b3 Author: Armin Le Grand (Collabora) <armin.le.gr...@me.com> AuthorDate: Thu Jul 25 13:36:40 2024 +0200 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Thu Jul 25 16:52:08 2024 +0200 CairoSDPR: Added more care to TransparencyGradient In VclMetafileProcessor2D for handling the PolyPolygonGradientPrimitive2D the case that is may have now a alphaGradient has to be handled with more care for adding a gradient itself and also for added SVG information, see BGRAD_SEQ_BEGIN stuff Change-Id: Ifab5ec9581a5e400549189a5a41190a91c0cb4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171009 Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> Tested-by: Jenkins diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 3ec3c4922260..aa54a63366ae 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1986,6 +1986,13 @@ void VclMetafileProcessor2D::processPolyPolygonGradientPrimitive2D( { bool useDecompose(false); + // SDPR: Caution: metafile export cannot handle added TransparencyGradient + if (rGradientCandidate.hasAlphaGradient()) + { + // SDPR: metafile cannot handle this, use decompose + useDecompose = true; + } + if (!useDecompose) { basegfx::B2DVector aScale, aTranslate; @@ -2049,7 +2056,8 @@ void VclMetafileProcessor2D::processPolyPolygonGradientPrimitive2D( GDIMetaFile* pMetaFile(mpOutputDevice->GetConnectMetaFile()); // tdf#155479 only add 'BGRAD_SEQ_BEGIN' if SVG export - if (nullptr != pMetaFile && pMetaFile->getSVG()) + // SDPR: Caution: metafile export cannot handle added TransparencyGradient + if (nullptr != pMetaFile && pMetaFile->getSVG() && !rGradientCandidate.hasAlphaGradient()) { // write the color stops to a memory stream SvMemoryStream aMemStm;