eeschema: Fix plot line width for negative lines
Negative width lines are used to hide the outline of shapes in eeschema. Plot should not show these lines.
This commit is contained in:
parent
80cf4ec5cb
commit
94fa734c61
|
@ -302,9 +302,15 @@ void LIB_ARC::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Arc( pos, -t2, -t1, m_Radius, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int LIB_ARC::GetPenSize() const
|
||||
|
|
|
@ -205,9 +205,15 @@ void LIB_BEZIER::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int LIB_BEZIER::GetPenSize() const
|
||||
|
|
|
@ -157,9 +157,15 @@ void LIB_CIRCLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Circle( pos, m_Radius * 2, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int LIB_CIRCLE::GetPenSize() const
|
||||
|
|
|
@ -163,9 +163,15 @@ void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIB_POLYLINE::AddPoint( const wxPoint& point )
|
||||
|
|
|
@ -147,9 +147,15 @@ void LIB_RECTANGLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
}
|
||||
|
||||
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
|
||||
auto pen_size = GetPenSize();
|
||||
|
||||
if( !already_filled || pen_size > 0 )
|
||||
{
|
||||
pen_size = std::max( 0, pen_size );
|
||||
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
|
||||
aPlotter->Rect( pos, end, already_filled ? NO_FILL : m_Fill, GetPenSize() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int LIB_RECTANGLE::GetPenSize() const
|
||||
|
|
Loading…
Reference in New Issue