7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-07 17:45:32 +00:00

Render tables & their borders to 3D view.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19981
This commit is contained in:
Jeff Young 2025-03-13 14:04:15 +00:00
parent 93ea523eec
commit f3f9730f2c
2 changed files with 11 additions and 4 deletions

View File

@ -794,11 +794,18 @@ void BOARD_ADAPTER::addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aC
void BOARD_ADAPTER::addTable( const PCB_TABLE* aTable, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
{
// JEY TODO: tables
// add borders
aTable->DrawBorders(
[&]( const VECTOR2I& ptA, const VECTOR2I& ptB, const STROKE_PARAMS& stroke )
{
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( ptA ), TO_SFVEC2F( ptB ),
TO_3DU( stroke.GetWidth() ), *aOwner );
} );
for( PCB_TABLECELL* cell : aTable->GetCells() )
addText( cell, aContainer, aOwner );
{
if( cell->GetColSpan() > 0 && cell->GetRowSpan() > 0 )
addText( cell, aContainer, aOwner );
}
}

View File

@ -940,7 +940,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
break;
case PCB_TABLE_T:
// JEY TODO: tables
addTable( static_cast<PCB_TABLE*>( item ), layerContainer, item );
break;
case PCB_DIM_ALIGNED_T: