Print sheet background colour if specified.
This commit is contained in:
parent
126d40f9d3
commit
9720fc80fe
|
@ -79,7 +79,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
|
||||||
m_ModeColorOption->SetSelection( 0 );
|
m_ModeColorOption->SetSelection( 0 );
|
||||||
gbSizer1->Add( m_ModeColorOption, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 );
|
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") );
|
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 );
|
gbSizer1->Add( m_plotBackgroundColor, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||||
|
|
|
@ -741,7 +741,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Plot sheet background color</property>
|
<property name="label">Plot background color</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
|
|
@ -554,9 +554,19 @@ void SCH_SHEET::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset )
|
||||||
wxDC* DC = aSettings->GetPrintDC();
|
wxDC* DC = aSettings->GetPrintDC();
|
||||||
wxPoint pos = m_pos + aOffset;
|
wxPoint pos = m_pos + aOffset;
|
||||||
int lineWidth = std::max( GetPenWidth(), aSettings->GetDefaultPenWidth() );
|
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 )
|
for( SCH_FIELD& field : m_fields )
|
||||||
field.Print( aSettings, aOffset );
|
field.Print( aSettings, aOffset );
|
||||||
|
|
Loading…
Reference in New Issue