Browse Source

Pcbnew: fix text position when drawing PCB_TEXTs on non paired layers

For these texts, and when the view was "flip board view" option, these text
positions were incorrectly calculated for texts having a text rotation not 0.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18980
pcb_db
jean-pierre charras 12 months ago
parent
commit
ae99be3d65
  1. 2
      pcbnew/pcb_painter.cpp

2
pcbnew/pcb_painter.cpp

@ -2215,7 +2215,7 @@ void PCB_PAINTER::draw( const PCB_TEXT* aText, int aLayer )
{
VECTOR2I textPos = aText->GetTextPos();
VECTOR2I textWidth = VECTOR2I( aText->GetTextBox().GetWidth(), 0 );
RotatePoint( textWidth, textPos, aText->GetDrawRotation() );
RotatePoint( textWidth, VECTOR2I( 0, 0 ), aText->GetDrawRotation() );
if( attrs.m_Mirrored )
textPos -= textWidth;

Loading…
Cancel
Save