Pay better attention to aPlotter->GetColorMode().
Fixes https://gitlab.com/kicad/code/kicad/issues/11287
This commit is contained in:
parent
bb43a3926a
commit
748cc1a59a
|
@ -327,7 +327,11 @@ void LIB_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOf
|
||||||
|
|
||||||
if( penWidth > 0 )
|
if( penWidth > 0 )
|
||||||
{
|
{
|
||||||
|
if( aPlotter->GetColorMode() && GetStroke().GetColor() != COLOR4D::UNSPECIFIED )
|
||||||
|
aPlotter->SetColor( GetStroke().GetColor() );
|
||||||
|
else
|
||||||
aPlotter->SetColor( color );
|
aPlotter->SetColor( color );
|
||||||
|
|
||||||
aPlotter->Rect( start, end, FILL_T::NO_FILL, penWidth );
|
aPlotter->Rect( start, end, FILL_T::NO_FILL, penWidth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,13 +101,11 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground ) const
|
||||||
cornerList.push_back( pt );
|
cornerList.push_back( pt );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( GetStroke().GetColor() == COLOR4D::UNSPECIFIED )
|
|
||||||
aPlotter->SetColor( aPlotter->RenderSettings()->GetLayerColor( LAYER_NOTES ) );
|
|
||||||
else
|
|
||||||
aPlotter->SetColor( GetStroke().GetColor() );
|
|
||||||
|
|
||||||
if( aBackground )
|
if( aBackground )
|
||||||
{
|
{
|
||||||
|
if( !aPlotter->GetColorMode() )
|
||||||
|
return;
|
||||||
|
|
||||||
if( m_fill == FILL_T::FILLED_WITH_COLOR && GetFillColor() != COLOR4D::UNSPECIFIED )
|
if( m_fill == FILL_T::FILLED_WITH_COLOR && GetFillColor() != COLOR4D::UNSPECIFIED )
|
||||||
{
|
{
|
||||||
aPlotter->SetColor( GetFillColor() );
|
aPlotter->SetColor( GetFillColor() );
|
||||||
|
@ -141,6 +139,11 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground ) const
|
||||||
}
|
}
|
||||||
else /* if( aForeground ) */
|
else /* if( aForeground ) */
|
||||||
{
|
{
|
||||||
|
if( aPlotter->GetColorMode() && GetStroke().GetColor() != COLOR4D::UNSPECIFIED )
|
||||||
|
aPlotter->SetColor( GetStroke().GetColor() );
|
||||||
|
else
|
||||||
|
aPlotter->SetColor( aPlotter->RenderSettings()->GetLayerColor( LAYER_NOTES ) );
|
||||||
|
|
||||||
aPlotter->SetCurrentLineWidth( pen_size );
|
aPlotter->SetCurrentLineWidth( pen_size );
|
||||||
aPlotter->SetDash( GetEffectiveLineStyle() );
|
aPlotter->SetDash( GetEffectiveLineStyle() );
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,11 @@ void SCH_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground ) const
|
||||||
{
|
{
|
||||||
penWidth = std::max( penWidth, settings->GetMinPenWidth() );
|
penWidth = std::max( penWidth, settings->GetMinPenWidth() );
|
||||||
|
|
||||||
|
if( aPlotter->GetColorMode() && GetStroke().GetColor() != COLOR4D::UNSPECIFIED )
|
||||||
|
aPlotter->SetColor( GetStroke().GetColor() );
|
||||||
|
else
|
||||||
aPlotter->SetColor( color );
|
aPlotter->SetColor( color );
|
||||||
|
|
||||||
aPlotter->Rect( m_start, m_end, FILL_T::NO_FILL, penWidth );
|
aPlotter->Rect( m_start, m_end, FILL_T::NO_FILL, penWidth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue