FP_TEXT: account for parent rotation when creating clearance shape

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8728
This commit is contained in:
Jon Evans 2021-07-05 13:49:32 -04:00
parent 12305990bb
commit b6e8beb38c
1 changed files with 5 additions and 0 deletions

View File

@ -313,6 +313,11 @@ void FP_TEXT::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffe
bool aIgnoreLineWidth ) const
{
EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( &aCornerBuffer, aClearance );
const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_parent );
if( parentFootprint )
aCornerBuffer.Rotate( DECIDEG2RAD( GetDrawRotation() ), GetTextPos() );
}