diff --git a/eeschema/lib_textbox.cpp b/eeschema/lib_textbox.cpp index c3d3f808ec..13b9274aac 100644 --- a/eeschema/lib_textbox.cpp +++ b/eeschema/lib_textbox.cpp @@ -327,7 +327,11 @@ void LIB_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOf if( penWidth > 0 ) { - aPlotter->SetColor( color ); + if( aPlotter->GetColorMode() && GetStroke().GetColor() != COLOR4D::UNSPECIFIED ) + aPlotter->SetColor( GetStroke().GetColor() ); + else + aPlotter->SetColor( color ); + aPlotter->Rect( start, end, FILL_T::NO_FILL, penWidth ); } diff --git a/eeschema/sch_shape.cpp b/eeschema/sch_shape.cpp index 368b9fa46c..3cf994aa9e 100644 --- a/eeschema/sch_shape.cpp +++ b/eeschema/sch_shape.cpp @@ -101,13 +101,11 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground ) const cornerList.push_back( pt ); } - if( GetStroke().GetColor() == COLOR4D::UNSPECIFIED ) - aPlotter->SetColor( aPlotter->RenderSettings()->GetLayerColor( LAYER_NOTES ) ); - else - aPlotter->SetColor( GetStroke().GetColor() ); - if( aBackground ) { + if( !aPlotter->GetColorMode() ) + return; + if( m_fill == FILL_T::FILLED_WITH_COLOR && GetFillColor() != COLOR4D::UNSPECIFIED ) { aPlotter->SetColor( GetFillColor() ); @@ -141,6 +139,11 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter, bool aBackground ) const } 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->SetDash( GetEffectiveLineStyle() ); diff --git a/eeschema/sch_textbox.cpp b/eeschema/sch_textbox.cpp index 9df1c6d0c2..db025dab64 100644 --- a/eeschema/sch_textbox.cpp +++ b/eeschema/sch_textbox.cpp @@ -340,7 +340,11 @@ void SCH_TEXTBOX::Plot( PLOTTER* aPlotter, bool aBackground ) const { penWidth = std::max( penWidth, settings->GetMinPenWidth() ); - aPlotter->SetColor( color ); + if( aPlotter->GetColorMode() && GetStroke().GetColor() != COLOR4D::UNSPECIFIED ) + aPlotter->SetColor( GetStroke().GetColor() ); + else + aPlotter->SetColor( color ); + aPlotter->Rect( m_start, m_end, FILL_T::NO_FILL, penWidth ); }