PCB_TEXTBOX::TransformShapeToPolygon(): fix incorrect transform: when it

is a polygon (rotated rect by a non cardinal angle) the polygon is not
filled, so the shape is just a set of thick segments.
Fixes #16072
https://gitlab.com/kicad/code/kicad/-/issues/16072
This commit is contained in:
jean-pierre charras 2023-11-11 16:43:48 +01:00
parent 7e46e85c7d
commit d8498b62e0
2 changed files with 4 additions and 3 deletions

View File

@ -620,6 +620,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
case PCB_TEXTBOX_T:
addText( static_cast<PCB_TEXTBOX*>( item ), layerContainer, item );
if( static_cast<PCB_TEXTBOX*>( item )->IsBorderEnabled() )
addShape( static_cast<PCB_TEXTBOX*>( item ), layerContainer, item );
break;

View File

@ -580,9 +580,8 @@ void PCB_TEXTBOX::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID
const SHAPE_LINE_CHAIN& poly = m_poly.Outline( 0 );
for( int ii = 0; ii < poly.PointCount(); ++ii )
aBuffer.Append( poly.GetPoint( ii ) );
// build the polygon outline as a list of segmemts
// (The polygon is not filled).
if( m_borderEnabled && width > 0 )
{
for( int ii = 0; ii < poly.SegmentCount(); ++ii )