Adjust text and shadow offsets for flipped view.
Fixes https://gitlab.com/kicad/code/kicad/issues/6776
This commit is contained in:
parent
7b9c21e290
commit
c4117c1ecf
|
@ -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 );
|
||||||
|
|
Loading…
Reference in New Issue