drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 547d19d19c757eb4ebfa2a45009d71a40d8bae53 Author: Armin Le Grand (allotropia) <[email protected]> AuthorDate: Fri Dec 29 17:10:32 2023 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Jan 5 10:13:58 2024 +0100 tdf#158743 use maCurrentTransformation for embedding Seems to be an error in the preparation to Bitmap conversion in VclMetafileProcessor2D::processTransparencePrimitive2D. While for calculating the LogicRange maCurrentTransformation is used (and that is correct) it is *not* used in the embedding for calling convertToBitmapEx. It is correct to get back to logic/world coordinates for calculating the embedding, but maCurrentTransformation is needed to define the correct full embedding. I might have overlooked that in the original change because maCurrentTransformation is local to the VclMetafileProcessor2D in action right at that moment and is usually empty for simple cases, but - as can be seen - not always. Change-Id: Ib2deaa2c8328655ecc80964ba2e23e67964ac3ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161409 Tested-by: Jenkins Reviewed-by: Armin Le Grand <[email protected]> (cherry picked from commit 4bea19cf84c125ab3f66dbb40d2379f2d385a865) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161429 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index cf52ad926d36..e2bf833a4e49 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -2521,8 +2521,11 @@ void VclMetafileProcessor2D::processTransparencePrimitive2D( // primitive2d::TransparencePrimitive2D& rTrCand(); primitive2d::Primitive2DContainer xEmbedSeq{ &const_cast<primitive2d::TransparencePrimitive2D&>( rTransparenceCandidate) }; + + // tdf#158743 when embedding, do not forget to 1st apply the evtl. used + // CurrentTransformation (right-to-left, apply that 1st) xEmbedSeq = primitive2d::Primitive2DContainer{ new primitive2d::TransformPrimitive2D( - aEmbedding, std::move(xEmbedSeq)) }; + aEmbedding * maCurrentTransformation, std::move(xEmbedSeq)) }; // use empty ViewInformation & a useful MaximumQuadraticPixels // limitation to paint the content
