Kaydet (Commit) d9f21c90 authored tarafından Lennard's avatar Lennard Kaydeden (comit) Radek Doulík

Fixes Circular arrow distortion, Bug #46272

Distortion occurred when angle mod 90° != 0

All of my past & future contributions to LibreOffice may be
   licensed under the MPL/LGPLv3+ dual license
- Lennard Wasserthal

Change-Id: I4af7e7f1dcbc4d1262592c362532df4957e52399
Signed-off-by: 's avatarLennard <Wasserthal@nefkom.net>
Reviewed-on: https://gerrit.libreoffice.org/679Reviewed-by: 's avatarRadek Doulík <rodo@novell.com>
Tested-by: 's avatarRadek Doulík <rodo@novell.com>
üst 7d563039
...@@ -1725,10 +1725,9 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm ...@@ -1725,10 +1725,9 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
Point aCenter( aRect.Center() ); Point aCenter( aRect.Center() );
Point aStart( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + nXor ) ], sal_True, sal_True ) ); Point aStart( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + nXor ) ], sal_True, sal_True ) );
Point aEnd( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + ( nXor ^ 1 ) ) ], sal_True, sal_True ) ); Point aEnd( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + ( nXor ^ 1 ) ) ], sal_True, sal_True ) );
double fRatio = (double)aRect.GetHeight() / (double)aRect.GetWidth(); aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) ) ) + aCenter.X();
aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) ) * fRatio ) + aCenter.X();
aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) ) ) + aCenter.Y(); aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) ) ) + aCenter.Y();
aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) ) * fRatio ) + aCenter.X(); aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) ) ) + aCenter.X();
aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) ) ) + aCenter.Y(); aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) ) ) + aCenter.Y();
aNewB2DPolygon.append(CreateArc( aRect, aStart, aEnd, bClockwise)); aNewB2DPolygon.append(CreateArc( aRect, aStart, aEnd, bClockwise));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment