FP_TEXT::TransformShapeWithClearanceToPolygon(): fix broken rotation of the shape.

Only the FP_TEXT shape must be rotated, not the full buffer used for storage.
Fixes #9057
https://gitlab.com/kicad/code/kicad/issues/9057
This commit is contained in:
jean-pierre charras 2021-08-31 17:04:03 +02:00
parent b5a3385ea9
commit 8fa04eeb75
1 changed files with 5 additions and 2 deletions

View File

@ -311,12 +311,15 @@ void FP_TEXT::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffe
int aError, ERROR_LOC aErrorLoc,
bool aIgnoreLineWidth ) const
{
EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( &aCornerBuffer, aClearance );
SHAPE_POLY_SET buffer;
EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( &buffer, aClearance );
const FOOTPRINT* parentFootprint = static_cast<const FOOTPRINT*>( m_parent );
if( parentFootprint )
aCornerBuffer.Rotate( DECIDEG2RAD( GetDrawRotation() ), GetTextPos() );
buffer.Rotate( DECIDEG2RAD( GetDrawRotation() ), GetTextPos() );
aCornerBuffer.Append( buffer );
}