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>
This commit is contained in:
@@ -293,7 +293,6 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
|
|||||||
// set parameters and paint text snippet
|
// set parameters and paint text snippet
|
||||||
const basegfx::BColor aRGBFontColor(
|
const basegfx::BColor aRGBFontColor(
|
||||||
maBColorModifierStack.getModifiedColor(rTextCandidate.getFontColor()));
|
maBColorModifierStack.getModifiedColor(rTextCandidate.getFontColor()));
|
||||||
const Point aStartPoint(aTextTranslate.getX(), aTextTranslate.getY());
|
|
||||||
const vcl::text::ComplexTextLayoutFlags nOldLayoutMode(mpOutputDevice->GetLayoutMode());
|
const vcl::text::ComplexTextLayoutFlags nOldLayoutMode(mpOutputDevice->GetLayoutMode());
|
||||||
|
|
||||||
if (rTextCandidate.getFontAttribute().getRTL())
|
if (rTextCandidate.getFontAttribute().getRTL())
|
||||||
@@ -343,7 +342,8 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
|
|||||||
getTransformFromMapMode(mpOutputDevice->GetMapMode()) * maCurrentTransformation);
|
getTransformFromMapMode(mpOutputDevice->GetMapMode()) * maCurrentTransformation);
|
||||||
|
|
||||||
basegfx::B2DVector aCurrentScaling, aCurrentTranslate;
|
basegfx::B2DVector aCurrentScaling, aCurrentTranslate;
|
||||||
aCombinedTransform.decompose(aCurrentScaling, aCurrentTranslate, fIgnoreRotate,
|
double fCurrentRotate;
|
||||||
|
aCombinedTransform.decompose(aCurrentScaling, aCurrentTranslate, fCurrentRotate,
|
||||||
fIgnoreShearX);
|
fIgnoreShearX);
|
||||||
|
|
||||||
const Point aOrigin(basegfx::fround(aCurrentTranslate.getX() / aCurrentScaling.getX()),
|
const Point aOrigin(basegfx::fround(aCurrentTranslate.getX() / aCurrentScaling.getX()),
|
||||||
@@ -351,6 +351,10 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
|
|||||||
MapMode aMapMode(mpOutputDevice->GetMapMode().GetMapUnit(), aOrigin,
|
MapMode aMapMode(mpOutputDevice->GetMapMode().GetMapUnit(), aOrigin,
|
||||||
Fraction(aCurrentScaling.getX()), Fraction(aCurrentScaling.getY()));
|
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());
|
const bool bChangeMapMode(aMapMode != mpOutputDevice->GetMapMode());
|
||||||
if (bChangeMapMode)
|
if (bChangeMapMode)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user