Textbox in symbols: fix incorrect position of the box when printing.

Fixes #11884
https://gitlab.com/kicad/code/kicad/issues/11884
This commit is contained in:
jean-pierre charras 2022-06-24 17:07:22 +02:00
parent 554b31bb2a
commit de45e2b1fd
1 changed files with 3 additions and 1 deletions

View File

@ -229,7 +229,9 @@ void LIB_TEXTBOX::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffs
STROKE_PARAMS::Stroke( shape, lineStyle, penWidth, aSettings,
[&]( const VECTOR2I& a, const VECTOR2I& b )
{
GRLine( DC, a.x, a.y, b.x, b.y, penWidth, color );
VECTOR2I pts = aTransform.TransformCoordinate( a ) + aOffset;
VECTOR2I pte = aTransform.TransformCoordinate( b ) + aOffset;
GRLine( DC, pts.x, pts.y, pte.x, pte.y, penWidth, color );
} );
}