summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-12-29 17:10:32 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-12-29 20:23:49 +0100
commit4bea19cf84c125ab3f66dbb40d2379f2d385a865 (patch)
tree7c993f8c0affc87ef9858bda5ce7cc9fe3b114aa /drawinglayer
parentd048de6e9fb9197250e924553d46fd6ec4820cb9 (diff)
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 <Armin.Le.Grand@me.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 22283a7d8c8e..22f464d70b7f 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