From b6e8beb38c59614964fcb43e97ae4abcfff0edd1 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 5 Jul 2021 13:49:32 -0400 Subject: [PATCH] FP_TEXT: account for parent rotation when creating clearance shape Fixes https://gitlab.com/kicad/code/kicad/-/issues/8728 --- pcbnew/board_items_to_polygon_shape_transform.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 99260c34c6..139239ee19 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -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( m_parent ); + + if( parentFootprint ) + aCornerBuffer.Rotate( DECIDEG2RAD( GetDrawRotation() ), GetTextPos() ); }