diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-07-13 22:54:05 +0500 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-07-16 10:27:42 +0200 |
commit | c39e163029ac3cc5e3113ab7754566b319045a79 (patch) | |
tree | 1c6ed8f9f005b8d0fa21c2af632a01faccbb853d /drawinglayer | |
parent | 7dbc5804e513fa94cc2e13b30d50215a27e8dfc1 (diff) |
tdf#161990: take MapMode's origin point into account
Regression from commit cc3663bbaed4f65d64154e5f9abb51a5f622f710 (tdf#160702:
improve text positioning, 2024-04-20).
Change-Id: I03f461d7f03c3e67ccdb8c4376720feb69903d6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170432
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit ccc3996cfcbebe14e9d5f3511906cfc64ddf3452)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170466
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 0b6314e95928..45127a454008 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -426,13 +426,14 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( MapMode aMapMode = mpOutputDevice->GetMapMode(); aMapMode.SetScaleX(aMapMode.GetScaleX() * nFontScalingFixX); aMapMode.SetScaleY(aMapMode.GetScaleY() * nFontScalingFixY); + Point origin = aMapMode.GetOrigin(); mpOutputDevice->Push(vcl::PushFlags::MAPMODE); mpOutputDevice->SetRelativeMapMode(aMapMode); bChangeMapMode = true; - aPointX /= nFontScalingFixX; - aPointY /= nFontScalingFixY; + aPointX = (aPointX + origin.X()) / nFontScalingFixX - origin.X(); + aPointY = (aPointY + origin.Y()) / nFontScalingFixY - origin.Y(); } } |