Adjust text and shadow offsets for flipped view.

Fixes https://gitlab.com/kicad/code/kicad/issues/6776
This commit is contained in:
Jeff Young 2020-12-17 17:44:58 +00:00
parent 7b9c21e290
commit c4117c1ecf
1 changed files with 6 additions and 0 deletions

View File

@ -165,6 +165,12 @@ void drawTicksAlongLine( KIGFX::VIEW* aView, const VECTOR2D& aOrigin, const VECT
double majorTickLen = aMinorTickLen * ( majorTickLengthFactor + 1 ); double majorTickLen = aMinorTickLen * ( majorTickLengthFactor + 1 );
VECTOR2D labelOffset = tickLine.Resize( majorTickLen - textOffset ); VECTOR2D labelOffset = tickLine.Resize( majorTickLen - textOffset );
if( aView->IsMirroredX() )
{
textOffset = -textOffset;
labelOffset = -labelOffset;
}
if( aLine.Angle() > 0 ) if( aLine.Angle() > 0 )
{ {
gal->SetHorizontalJustify( GR_TEXT_HJUSTIFY_LEFT ); gal->SetHorizontalJustify( GR_TEXT_HJUSTIFY_LEFT );