Sheet pins: fix incorrect size and plot thickness of the graphic symbol.

Unlike the global labels, the hierarchical label is not inside the graphic symbol.
So the graphic symbol size depends only of the text size, not of the text offset.
This commit is contained in:
jean-pierre charras 2020-04-29 16:48:21 +02:00
parent 62d78cdf49
commit d10c8cd75b
1 changed files with 4 additions and 6 deletions

View File

@ -625,10 +625,8 @@ void SCH_TEXT::Plot( PLOTTER* aPlotter )
// Draw graphic symbol for global or hierarchical labels
CreateGraphicShape( aPlotter->RenderSettings(), Poly, GetTextPos() );
aPlotter->SetCurrentLineWidth( penWidth );
if( Poly.size() )
aPlotter->PlotPoly( Poly, NO_FILL );
aPlotter->PlotPoly( Poly, NO_FILL, penWidth );
}
@ -1123,10 +1121,10 @@ void SCH_HIERLABEL::Print( RENDER_SETTINGS* aSettings, const wxPoint& offset )
void SCH_HIERLABEL::CreateGraphicShape( RENDER_SETTINGS* aRenderSettings,
std::vector<wxPoint>& aPoints, const wxPoint& Pos )
{
int margin = GetTextOffset( aRenderSettings );
int* Template = TemplateShape[static_cast<int>( m_shape )][static_cast<int>( m_spin_style )];
int halfSize = ( GetTextHeight() / 2 ) + margin;
int imax = *Template; Template++;
int halfSize = GetTextHeight() / 2;
int imax = *Template;
Template++;
aPoints.clear();