diff --git a/eeschema/dialogs/dialog_plot_schematic_base.cpp b/eeschema/dialogs/dialog_plot_schematic_base.cpp index 64b7ecfe8f..7fc290bd71 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_base.cpp @@ -79,7 +79,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind m_ModeColorOption->SetSelection( 0 ); gbSizer1->Add( m_ModeColorOption, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); - m_plotBackgroundColor = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot sheet background color"), wxDefaultPosition, wxDefaultSize, 0 ); + m_plotBackgroundColor = new wxCheckBox( sbOptions->GetStaticBox(), wxID_ANY, _("Plot background color"), wxDefaultPosition, wxDefaultSize, 0 ); m_plotBackgroundColor->SetToolTip( _("Plot the background color if the output format supports it") ); gbSizer1->Add( m_plotBackgroundColor, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); diff --git a/eeschema/dialogs/dialog_plot_schematic_base.fbp b/eeschema/dialogs/dialog_plot_schematic_base.fbp index ab4efedb3f..0566136a6f 100644 --- a/eeschema/dialogs/dialog_plot_schematic_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_base.fbp @@ -741,7 +741,7 @@ 0 0 wxID_ANY - Plot sheet background color + Plot background color 0 diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 872900253a..6b1da2eb86 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -554,9 +554,19 @@ void SCH_SHEET::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) wxDC* DC = aSettings->GetPrintDC(); wxPoint pos = m_pos + aOffset; int lineWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() ); - COLOR4D color = GetBorderColor(); + COLOR4D background = GetBackgroundColor(); + COLOR4D border = GetBorderColor(); - GRRect( nullptr, DC, pos.x, pos.y, pos.x + m_size.x, pos.y + m_size.y, lineWidth, color ); + if( background == COLOR4D::UNSPECIFIED ) + background = aSettings->GetLayerColor( LAYER_SHEET_BACKGROUND ); + + if( border == COLOR4D::UNSPECIFIED ) + border = aSettings->GetLayerColor( LAYER_SHEET ); + + if( background != COLOR4D::UNSPECIFIED && background != COLOR4D::WHITE ) + GRRect( nullptr, DC, pos.x, pos.y, pos.x + m_size.x, pos.y + m_size.y, background ); + + GRRect( nullptr, DC, pos.x, pos.y, pos.x + m_size.x, pos.y + m_size.y, lineWidth, border ); for( SCH_FIELD& field : m_fields ) field.Print( aSettings, aOffset );