diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-10-22 21:21:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-10-23 17:04:38 +0200 |
commit | 698ba5fcd9f01f8f6e9f300d914d8538ad527219 (patch) | |
tree | 75d0de359bd653fc29f2cd13d43ad1531fe13ead /drawinglayer | |
parent | f024738e2218ed67c1948a9aa6149084939a2a52 (diff) |
tdf#151674 rotate text starting point
Change-Id: Ibcfb4b102a58cad53c1ce5f569721e4557844b4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141673
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index cf1ea90aa228..24b71ebb1873 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -293,7 +293,6 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( // set parameters and paint text snippet const basegfx::BColor aRGBFontColor( maBColorModifierStack.getModifiedColor(rTextCandidate.getFontColor())); - const Point aStartPoint(aTextTranslate.getX(), aTextTranslate.getY()); const vcl::text::ComplexTextLayoutFlags nOldLayoutMode(mpOutputDevice->GetLayoutMode()); if (rTextCandidate.getFontAttribute().getRTL()) @@ -343,7 +342,8 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( getTransformFromMapMode(mpOutputDevice->GetMapMode()) * maCurrentTransformation); basegfx::B2DVector aCurrentScaling, aCurrentTranslate; - aCombinedTransform.decompose(aCurrentScaling, aCurrentTranslate, fIgnoreRotate, + double fCurrentRotate; + aCombinedTransform.decompose(aCurrentScaling, aCurrentTranslate, fCurrentRotate, fIgnoreShearX); const Point aOrigin(basegfx::fround(aCurrentTranslate.getX() / aCurrentScaling.getX()), @@ -351,6 +351,10 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( MapMode aMapMode(mpOutputDevice->GetMapMode().GetMapUnit(), aOrigin, Fraction(aCurrentScaling.getX()), Fraction(aCurrentScaling.getY())); + if (fCurrentRotate) + aTextTranslate *= basegfx::utils::createRotateB2DHomMatrix(fCurrentRotate); + const Point aStartPoint(aTextTranslate.getX(), aTextTranslate.getY()); + const bool bChangeMapMode(aMapMode != mpOutputDevice->GetMapMode()); if (bChangeMapMode) { |