drawinglayer/source/processor2d/vclprocessor2d.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
New commits: commit a253459637241a7cfedd44f67c249bbd4447d07c Author: Caolán McNamara <[email protected]> AuthorDate: Mon Nov 10 21:25:15 2025 +0000 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Mon Nov 24 10:16:13 2025 +0100 tdf#158036 Incorrect positioning of rotated SVG text when padding is applied this path is no longer the default for gtk3 where the SDPR renderer is the default so there: export DISABLE_SYSTEM_DEPENDENT_PRIMITIVE_RENDERER=1 is needed, though it is still the default for the gen backend, so that can be used too Change-Id: If64b7805ee4987ceab5af99decdf755280270e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194079 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins (cherry picked from commit 8e764204b49d0be0742ccad68bc6d1e2b8726875) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194164 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index cdefe9095ad4..ba078cdd9f0f 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -370,18 +370,22 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( MapMode aMapMode(mpOutputDevice->GetMapMode().GetMapUnit(), aOrigin, aScaleX, aScaleY); - - if (fCurrentRotate) - aTextTranslate *= basegfx::utils::createRotateB2DHomMatrix(fCurrentRotate); - aStartPoint = Point(basegfx::fround<tools::Long>(aTextTranslate.getX()), - basegfx::fround<tools::Long>(aTextTranslate.getY())); - bChangeMapMode = aMapMode != mpOutputDevice->GetMapMode(); if (bChangeMapMode) { mpOutputDevice->Push(vcl::PushFlags::MAPMODE); mpOutputDevice->SetRelativeMapMode(aMapMode); } + + basegfx::B2DHomMatrix aFinalTransform(aCombinedTransform + * rTextCandidate.getTextTransform()); + const basegfx::B2DPoint aPoint(aFinalTransform * basegfx::B2DPoint(0.0, 0.0)); + + Point aFinalPoint( + basegfx::fround<tools::Long>(aPoint.getX() / aCurrentScaling.getX()), + basegfx::fround<tools::Long>(aPoint.getY() / aCurrentScaling.getY())); + + aStartPoint = Point(aFinalPoint.X() - aOrigin.X(), aFinalPoint.Y() - aOrigin.Y()); } else {
