diff --git a/eeschema/sch_table.cpp b/eeschema/sch_table.cpp index ab2af5669f..42a0ba0d88 100644 --- a/eeschema/sch_table.cpp +++ b/eeschema/sch_table.cpp @@ -546,16 +546,29 @@ void SCH_TABLE::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS& if( GetBorderStroke().GetWidth() >= 0 ) { setupStroke( GetBorderStroke() ); + SCH_TABLECELL* cell = GetCell( 0, 0 ); if( StrokeHeader() ) { - SCH_TABLECELL* cell = GetCell( 0, 0 ); - aPlotter->MoveTo( VECTOR2I( pos.x, cell->GetEndY() ) ); - aPlotter->FinishTo( VECTOR2I( end.x, cell->GetEndY() ) ); - } + if( !cell->GetTextAngle().IsHorizontal() ) + { + aPlotter->MoveTo( VECTOR2I( cell->GetEndX(), pos.y ) ); + aPlotter->FinishTo( VECTOR2I( cell->GetEndX(), cell->GetEndY() ) ); + } + else + { + aPlotter->MoveTo( VECTOR2I( pos.x, cell->GetEndY() ) ); + aPlotter->FinishTo( VECTOR2I( end.x, cell->GetEndY() ) ); + } + } if( StrokeExternal() ) + { + RotatePoint( pos, GetPosition(), cell->GetTextAngle() ); + RotatePoint( end, GetPosition(), cell->GetTextAngle() ); + aPlotter->Rect( pos, end, FILL_T::NO_FILL, lineWidth ); + } } } diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 04ad8400d3..f0900d73c2 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -1189,15 +1189,23 @@ void BRDITEMS_PLOTTER::PlotTableBorders( const PCB_TABLE* aTable ) if( aTable->GetBorderStroke().GetWidth() >= 0 ) { setupStroke( aTable->GetBorderStroke() ); + PCB_TABLECELL* cell = aTable->GetCell( 0, 0 ); if( aTable->StrokeHeader() ) { - PCB_TABLECELL* cell = aTable->GetCell( 0, 0 ); - strokeLine( VECTOR2I( pos.x, cell->GetEndY() ), VECTOR2I( end.x, cell->GetEndY() ) ); + if( !cell->GetTextAngle().IsHorizontal() ) + strokeLine( VECTOR2I( cell->GetEndX(), pos.y ), VECTOR2I( cell->GetEndX(), cell->GetEndY() ) ); + else + strokeLine( VECTOR2I( pos.x, cell->GetEndY() ), VECTOR2I( end.x, cell->GetEndY() ) ); } if( aTable->StrokeExternal() ) + { + RotatePoint( pos, aTable->GetPosition(), cell->GetTextAngle() ); + RotatePoint( end, aTable->GetPosition(), cell->GetTextAngle() ); + strokeRect( pos, end ); + } } }