ADDED: Schematic plotting can use a dedicated color theme

ADDED: PDF, PS, and SVG plots can optionally include the page background color

Fixes #1830
This commit is contained in:
Jon Evans 2020-03-05 22:00:30 -05:00
parent 8660b4c144
commit 643c97a2f4
32 changed files with 501 additions and 629 deletions

View File

@ -62,10 +62,6 @@ bool PDF_PLOTTER::OpenFile( const wxString& aFullFilename )
return true;
}
void PDF_PLOTTER::SetPageSettings( const PAGE_INFO& aPageSettings )
{
pageInfo = aPageSettings;
}
void PDF_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )

View File

@ -593,9 +593,3 @@ void PLOTTER::PlotPoly( const SHAPE_LINE_CHAIN& aCornerList, FILL_T aFill,
PlotPoly( cornerList, aFill, aWidth, aData );
}
void PLOTTER::SetPageSettings( const PAGE_INFO& aPageSettings )
{
pageInfo = aPageSettings;
}

View File

@ -1,6 +1,6 @@
update=25/08/2019 19:59:15
update=Thu 05 Mar 2020 20:34:10 EST
version=1
last_client=kicad
last_client=eeschema
[general]
version=1
RootSch=video.sch
@ -13,22 +13,6 @@ EquName1=devcms
[eeschema]
version=1
LibDir=
[schematic_editor]
version=1
PageLayoutDescrFile=
PlotDirectoryName=
SubpartIdSeparator=0
SubpartFirstId=65
NetFmtName=Pcbnew
SpiceAjustPassiveValues=0
LabSize=50
ERC_WriteFile=0
ERC_TestSimilarLabels=1
ERC_CheckUniqueGlobalLabels=1
ERC_CheckBusDriverConflicts=1
ERC_CheckBusEntryConflicts=1
ERC_CheckBusToBusConflicts=1
ERC_CheckBusToNetConflicts=1
[pcbnew]
version=1
PageLayoutDescrFile=
@ -270,3 +254,19 @@ uViaDrill=0.127
dPairWidth=0.2
dPairGap=0.25
dPairViaGap=0.25
[schematic_editor]
version=1
PageLayoutDescrFile=
PlotDirectoryName=/home/jon/Desktop/plot_tests/
SubpartIdSeparator=0
SubpartFirstId=65
NetFmtName=Pcbnew
SpiceAjustPassiveValues=0
LabSize=50
ERC_WriteFile=0
ERC_TestSimilarLabels=1
ERC_CheckUniqueGlobalLabels=1
ERC_CheckBusDriverConflicts=1
ERC_CheckBusEntryConflicts=1
ERC_CheckBusToBusConflicts=1
ERC_CheckBusToNetConflicts=1

View File

@ -34,6 +34,7 @@
#include <kiface_i.h>
#include <pgm_base.h>
#include <sch_sheet.h>
#include <settings/settings_manager.h>
#include <ws_painter.h>
@ -85,6 +86,19 @@ void DIALOG_PLOT_SCHEMATIC::initDlg()
{
auto cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
{
int idx = m_colorTheme->Append( settings->GetName(), static_cast<void*>( settings ) );
if( settings->GetFilename() == cfg->m_PlotPanel.color_theme )
m_colorTheme->SetSelection( idx );
}
m_colorTheme->Enable( cfg->m_PlotPanel.color );
m_plotBackgroundColor->Enable( cfg->m_PlotPanel.color );
m_plotBackgroundColor->SetValue( cfg->m_PlotPanel.background_color );
// Set color or B&W plot option
setModeColor( cfg->m_PlotPanel.color );
@ -114,9 +128,11 @@ void DIALOG_PLOT_SCHEMATIC::initDlg()
break;
case PLOT_FORMAT::DXF:
m_plotFormatOpt->SetSelection( 3 );
m_plotBackgroundColor->Disable();
break;
case PLOT_FORMAT::HPGL:
m_plotFormatOpt->SetSelection( 4 );
m_plotBackgroundColor->Disable();
break;
}
@ -247,6 +263,12 @@ void DIALOG_PLOT_SCHEMATIC::OnUpdateUI( wxUpdateUIEvent& event )
m_plotOriginTitle->Enable( fmt == PLOT_FORMAT::HPGL );
m_plotOriginOpt->Enable( fmt == PLOT_FORMAT::HPGL );
m_penWidth.Enable( fmt == PLOT_FORMAT::HPGL );
m_plotBackgroundColor->Enable(
fmt == PLOT_FORMAT::POST || fmt == PLOT_FORMAT::PDF || fmt == PLOT_FORMAT::SVG );
m_colorTheme->Enable( fmt != PLOT_FORMAT::HPGL );
m_ModeColorOption->Enable( fmt != PLOT_FORMAT::HPGL );
}
}
@ -257,7 +279,10 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions()
auto cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
cfg->m_PlotPanel.background_color = m_plotBackgroundColor->GetValue();
cfg->m_PlotPanel.color = getModeColor();
cfg->m_PlotPanel.color_theme = static_cast<COLOR_SETTINGS*>(
m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) )->GetFilename();
cfg->m_PlotPanel.frame_reference = getPlotFrameRef();
cfg->m_PlotPanel.format = static_cast<int>( GetPlotFileFormat() );
cfg->m_PlotPanel.hpgl_origin = GetPlotOriginCenter();

View File

@ -154,5 +154,7 @@ public:
// outside a dialog. This is the reason we need aFrame as parameter
static bool plotOneSheetSVG( EDA_DRAW_FRAME* aFrame, const wxString& aFileName,
SCH_SCREEN* aScreen,
bool aPlotBlackAndWhite, bool aPlotFrameRef );
bool aPlotBlackAndWhite, bool aPlotFrameRef,
bool aPlotBackgroundColor = false,
COLOR_SETTINGS* aColors = nullptr );
};

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -30,7 +30,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
bSizerDir->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 4 );
m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_browseButton->SetMinSize( wxSize( 30,28 ) );
bSizerDir->Add( m_browseButton, 0, wxRIGHT, 5 );
@ -81,18 +81,34 @@ 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->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 );
m_staticText9 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText9->Wrap( -1 );
gbSizer1->Add( m_staticText9, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxArrayString m_colorThemeChoices;
m_colorTheme = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
m_colorTheme->SetSelection( 0 );
m_colorTheme->SetToolTip( _("Select the color theme to use for plotting") );
gbSizer1->Add( m_colorTheme, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
m_lineWidthLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthLabel->Wrap( -1 );
gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
gbSizer1->Add( m_lineWidthLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_lineWidthCtrl = new wxTextCtrl( sbOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthCtrl->SetToolTip( _("Selection of the default pen thickness used to draw items, when their thickness is set to 0.") );
gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 );
gbSizer1->Add( m_lineWidthCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 );
m_lineWidthUnits = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_lineWidthUnits->Wrap( -1 );
gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
gbSizer1->Add( m_lineWidthUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
gbSizer1->AddGrowableCol( 1 );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="13" />
<FileVersion major="1" minor="15" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">dialog_plot_schematic_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">Dialog_plot_schematic_base</property>
<property name="namespace"></property>
@ -52,41 +53,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnAuiFindManager"></event>
<event name="OnAuiPaneButton"></event>
<event name="OnAuiPaneClose"></event>
<event name="OnAuiPaneMaximize"></event>
<event name="OnAuiPaneRestore"></event>
<event name="OnAuiRender"></event>
<event name="OnChar"></event>
<event name="OnClose">OnCloseWindow</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI">OnUpdateUI</event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
@ -135,6 +102,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Output directory:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -160,29 +128,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
@ -247,33 +192,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
@ -298,6 +216,7 @@
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
@ -311,9 +230,10 @@
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="hover"></property>
<property name="id">wxID_ANY</property>
<property name="label">Browse</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -328,11 +248,12 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="selected"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxBU_AUTODRAW</property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
@ -344,29 +265,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnOutputDirectoryBrowseClicked</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
@ -444,30 +342,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox">OnPlotFormatSelection</event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
@ -482,7 +357,6 @@
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
@ -534,6 +408,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Page size:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -559,29 +434,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -649,30 +501,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnChoice">OnPageSizeSelected</event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -740,30 +569,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -802,6 +607,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Output mode:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -827,29 +633,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -917,30 +700,204 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnChoice"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="1">
<property name="border">5</property>
<property name="colspan">3</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
<property name="row">3</property>
<property name="rowspan">1</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Plot sheet background color</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_plotBackgroundColor</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Plot the background color if the output format supports it</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="gbsizeritem" expanded="1">
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="row">4</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Color theme:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticText9</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="gbsizeritem" expanded="1">
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">1</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="row">4</property>
<property name="rowspan">1</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_colorTheme</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Select the color theme to use for plotting</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -948,7 +905,7 @@
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="row">3</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
@ -979,6 +936,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Default line width:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -1004,29 +962,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -1034,7 +969,7 @@
<property name="colspan">1</property>
<property name="column">1</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="row">3</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
@ -1094,33 +1029,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -1128,7 +1036,7 @@
<property name="colspan">1</property>
<property name="column">2</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP</property>
<property name="row">3</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
@ -1159,6 +1067,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">mm</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -1184,29 +1093,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
@ -1225,7 +1111,6 @@
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
@ -1277,6 +1162,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Position:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -1302,29 +1188,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -1392,30 +1255,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnChoice"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -1454,6 +1293,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Pen width:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -1479,29 +1319,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -1569,33 +1386,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="gbsizeritem" expanded="0">
@ -1634,6 +1424,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">mm</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -1659,29 +1450,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
@ -1754,29 +1522,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
@ -1798,13 +1543,7 @@
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick">OnPlotCurrent</event>
<event name="OnCancelButtonClick"></event>
<event name="OnContextHelpButtonClick"></event>
<event name="OnHelpButtonClick"></event>
<event name="OnNoButtonClick"></event>
<event name="OnOKButtonClick">OnPlotAll</event>
<event name="OnSaveButtonClick"></event>
<event name="OnYesButtonClick"></event>
</object>
</object>
</object>

View File

@ -1,12 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PLOT_SCHEMATIC_BASE_H__
#define __DIALOG_PLOT_SCHEMATIC_BASE_H__
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
@ -21,10 +20,10 @@ class WX_HTML_REPORT_PANEL;
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/bmpbuttn.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/radiobox.h>
@ -54,6 +53,9 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
wxChoice* m_paperSizeOption;
wxCheckBox* m_PlotFrameRefOpt;
wxChoice* m_ModeColorOption;
wxCheckBox* m_plotBackgroundColor;
wxStaticText* m_staticText9;
wxChoice* m_colorTheme;
wxStaticText* m_lineWidthLabel;
wxTextCtrl* m_lineWidthCtrl;
wxStaticText* m_lineWidthUnits;
@ -86,4 +88,3 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
};
#endif //__DIALOG_PLOT_SCHEMATIC_BASE_H__

View File

@ -177,8 +177,14 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : APP_SETTINGS_BASE( "eeschema", eeschema
m_params.emplace_back( new PARAM_MAP<bool>( "field_editor.fields_group_by",
&m_FieldEditorPanel.fields_group_by, {} ) );
m_params.emplace_back(
new PARAM<bool>( "plot.background_color", &m_PlotPanel.background_color, false ) );
m_params.emplace_back( new PARAM<bool>( "plot.color", &m_PlotPanel.color, true ) );
m_params.emplace_back(
new PARAM<wxString>( "plot.color_theme", &m_PlotPanel.color_theme, wxT( "user" ) ) );
m_params.emplace_back( new PARAM<int>( "plot.format", &m_PlotPanel.format, 0 ) );
m_params.emplace_back( new PARAM<bool>( "plot.frame_reference",

View File

@ -130,7 +130,9 @@ public:
struct PANEL_PLOT
{
bool background_color;
bool color;
wxString color_theme;
int format;
bool frame_reference;
int hpgl_paper_size;

View File

@ -37,6 +37,7 @@
#include <general.h>
#include <lib_arc.h>
#include <transform.h>
#include <settings/color_settings.h>
#include <status_popup.h>
// Helper function
@ -272,7 +273,7 @@ void LIB_ARC::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR )
{
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->Arc( pos, -t2, -t1, m_Radius, FILLED_WITH_BG_BODYCOLOR, 0 );
}
@ -282,7 +283,7 @@ void LIB_ARC::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( !already_filled || pen_size > 0 )
{
pen_size = std::max( 0, pen_size );
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE ) );
aPlotter->Arc( pos, -t2, -t1, m_Radius, already_filled ? NO_FILL : m_Fill, pen_size );
}
}

View File

@ -35,6 +35,7 @@
#include <general.h>
#include <lib_circle.h>
#include <settings/color_settings.h>
#include <transform.h>
@ -175,7 +176,7 @@ void LIB_CIRCLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR )
{
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->Circle( pos, GetRadius() * 2, FILLED_WITH_BG_BODYCOLOR, 0 );
}
@ -185,7 +186,7 @@ void LIB_CIRCLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( !already_filled || pen_size > 0 )
{
pen_size = std::max( 0, pen_size );
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE ) );
aPlotter->Circle( pos, GetRadius() * 2, already_filled ? NO_FILL : m_Fill, pen_size );
}
}

View File

@ -39,6 +39,7 @@
#include <transform.h>
#include <lib_field.h>
#include <template_fieldnames.h>
#include <settings/color_settings.h>
LIB_FIELD::LIB_FIELD(LIB_PART * aParent, int idfield ) :
@ -297,7 +298,14 @@ void LIB_FIELD::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
EDA_TEXT_VJUSTIFY_T vjustify = GR_TEXT_VJUSTIFY_CENTER;
wxPoint textpos = aTransform.TransformCoordinate( BoundaryBox.Centre() ) + aOffset;
aPlotter->Text( textpos, GetDefaultColor(), GetShownText(), orient, GetTextSize(),
COLOR4D color;
if( aPlotter->GetColorMode() )
color = aPlotter->ColorSettings()->GetColor( GetDefaultLayer() );
else
color = COLOR4D::BLACK;
aPlotter->Text( textpos, color, GetShownText(), orient, GetTextSize(),
hjustify, vjustify, GetPenSize(), IsItalic(), IsBold() );
}
@ -357,17 +365,23 @@ void LIB_FIELD::ViewGetLayers( int aLayers[], int& aCount ) const
}
COLOR4D LIB_FIELD::GetDefaultColor()
SCH_LAYER_ID LIB_FIELD::GetDefaultLayer()
{
switch( m_id )
{
case REFERENCE: return GetLayerColor( LAYER_REFERENCEPART );
case VALUE: return GetLayerColor( LAYER_VALUEPART );
default: return GetLayerColor( LAYER_FIELDS );
case REFERENCE: return LAYER_REFERENCEPART;
case VALUE: return LAYER_VALUEPART;
default: return LAYER_FIELDS;
}
}
COLOR4D LIB_FIELD::GetDefaultColor()
{
return GetLayerColor( GetDefaultLayer() );
}
wxString LIB_FIELD::GetName( bool aTranslate ) const
{
switch( m_id )

View File

@ -172,6 +172,8 @@ public:
COLOR4D GetDefaultColor() override;
SCH_LAYER_ID GetDefaultLayer();
void BeginEdit( const wxPoint aStartPoint ) override;
void Offset( const wxPoint& aOffset ) override;

View File

@ -49,6 +49,7 @@
#include <transform.h>
#include <sch_component.h>
#include <sch_sheet_path.h>
#include <settings/color_settings.h>
#include <trace_helpers.h>
@ -868,7 +869,7 @@ void LIB_PIN::PrintPinElectricalTypeName( wxDC* aDC, wxPoint& aPosition, int aOr
void LIB_PIN::PlotSymbol( PLOTTER* aPlotter, const wxPoint& aPosition, int aOrientation )
{
int MapX1, MapY1, x1, y1;
COLOR4D color = GetLayerColor( LAYER_PIN );
COLOR4D color = aPlotter->ColorSettings()->GetColor( LAYER_PIN );
aPlotter->SetColor( color );
aPlotter->SetCurrentLineWidth( GetPenSize() );

View File

@ -34,6 +34,7 @@
#include <general.h>
#include <lib_polyline.h>
#include <settings/color_settings.h>
#include <transform.h>
@ -147,7 +148,7 @@ void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR )
{
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->PlotPoly( cornerList, FILLED_WITH_BG_BODYCOLOR, 0 );
}
@ -157,7 +158,7 @@ void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( !already_filled || pen_size > 0 )
{
pen_size = std::max( 0, pen_size );
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE ) );
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, pen_size );
}
}

View File

@ -34,6 +34,7 @@
#include <general.h>
#include <lib_rectangle.h>
#include <settings/color_settings.h>
#include <transform.h>
@ -140,7 +141,7 @@ void LIB_RECTANGLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR )
{
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->Rect( pos, end, FILLED_WITH_BG_BODYCOLOR, 0 );
}
@ -150,7 +151,7 @@ void LIB_RECTANGLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( !already_filled || pen_size > 0 )
{
pen_size = std::max( 0, pen_size );
aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_DEVICE ) );
aPlotter->Rect( pos, end, already_filled ? NO_FILL : m_Fill, pen_size );
}
}

View File

@ -39,6 +39,7 @@
#include <lib_item.h>
#include <general.h>
#include <transform.h>
#include <settings/color_settings.h>
#include <lib_text.h>
@ -287,7 +288,7 @@ void LIB_TEXT::Plot( PLOTTER* plotter, const wxPoint& offset, bool fill,
COLOR4D color;
if( plotter->GetColorMode() ) // Used normal color or selected color
color = GetDefaultColor();
color = plotter->ColorSettings()->GetColor( LAYER_DEVICE );
else
color = COLOR4D::BLACK;

View File

@ -112,10 +112,13 @@ bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF( const wxString& aFileName,
{
DXF_PLOTTER* plotter = new DXF_PLOTTER();
auto colors = static_cast<COLOR_SETTINGS*>(
m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
plotter->SetPageSettings( pageInfo );
plotter->SetColorMode( getModeColor() );
plotter->SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
plotter->SetColorSettings( colors );
// Currently, plot units are in decimil
plotter->SetViewport( aPlotOffset, IU_PER_MILS/10, aScale, false );
@ -134,12 +137,16 @@ bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF( const wxString& aFileName,
if( aPlotFrameRef )
{
COLOR4D color = plotter->GetColorMode() ?
plotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_WORKSHEET ) :
COLOR4D::BLACK;
PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
m_parent->GetPageSettings(),
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
m_parent->GetScreenDesc(),
aScreen->GetFileName(),
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
color );
}
aScreen->Plot( plotter );

View File

@ -202,16 +202,13 @@ bool DIALOG_PLOT_SCHEMATIC::Plot_1_Page_HPGL( const wxString& aFileName,
plotter->SetPenDiameter( m_HPGLPenSize );
plotter->StartPlot();
plotter->SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
plotter->SetColor( BLACK );
if( getPlotFrameRef() )
PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
m_parent->GetPageSettings(),
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
m_parent->GetScreenDesc(),
aScreen->GetFileName(),
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
COLOR4D::BLACK );
aScreen->Plot( plotter );

View File

@ -59,11 +59,14 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
else
sheetList.push_back( m_parent->GetCurrentSheet() );
auto colors = static_cast<COLOR_SETTINGS*>(
m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
// Allocate the plotter and set the job level parameter
PDF_PLOTTER* plotter = new PDF_PLOTTER();
plotter->SetDefaultLineWidth( GetDefaultLineThickness() );
plotter->SetColorMode( getModeColor() );
plotter->SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
plotter->SetColorSettings( colors );
plotter->SetCreator( wxT( "Eeschema-PDF" ) );
plotter->SetTitle( m_parent->GetTitleBlock().GetTitle() );
@ -148,15 +151,26 @@ void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF( PLOTTER* aPlotter,
SCH_SCREEN* aScreen,
bool aPlotFrameRef )
{
if( m_plotBackgroundColor->GetValue() )
{
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );
wxPoint end( aPlotter->PageSettings().GetWidthIU(),
aPlotter->PageSettings().GetHeightIU() );
aPlotter->Rect( wxPoint( 0, 0 ), end, FILLED_SHAPE, 1.0 );
}
if( aPlotFrameRef )
{
aPlotter->SetColor( BLACK );
COLOR4D color = aPlotter->GetColorMode() ?
aPlotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_WORKSHEET ) :
COLOR4D::BLACK;
PlotWorkSheet( aPlotter, m_parent->GetTitleBlock(),
m_parent->GetPageSettings(),
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
m_parent->GetScreenDesc(),
aScreen->GetFileName(),
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
color );
}
aScreen->Plot( aPlotter );

View File

@ -136,13 +136,16 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetPS( const wxString& aFileName,
double aScale,
bool aPlotFrameRef )
{
auto colors = static_cast<COLOR_SETTINGS*>(
m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
PS_PLOTTER* plotter = new PS_PLOTTER();
plotter->SetPageSettings( aPageInfo );
plotter->SetDefaultLineWidth( GetDefaultLineThickness() );
plotter->SetColorMode( getModeColor() );
plotter->SetColorSettings( colors );
// Currently, plot units are in decimil
plotter->SetViewport( aPlot0ffset, IU_PER_MILS/10, aScale, false );
plotter->SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
// Init :
plotter->SetCreator( wxT( "Eeschema-PS" ) );
@ -157,15 +160,26 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetPS( const wxString& aFileName,
plotter->StartPlot();
if( m_plotBackgroundColor )
{
plotter->SetColor( plotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );
wxPoint end( plotter->PageSettings().GetWidthIU(),
plotter->PageSettings().GetHeightIU() );
plotter->Rect( wxPoint( 0, 0 ), end, FILLED_SHAPE, 1.0 );
}
if( aPlotFrameRef )
{
plotter->SetColor( BLACK );
COLOR4D color = plotter->GetColorMode() ?
plotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_WORKSHEET ) :
COLOR4D::BLACK;
PlotWorkSheet( plotter, m_parent->GetTitleBlock(),
m_parent->GetPageSettings(),
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
m_parent->GetScreenDesc(),
aScreen->GetFileName(),
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
color );
}
aScreen->Plot( plotter );

View File

@ -48,6 +48,9 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
SCH_SHEET_LIST sheetList;
auto colors = static_cast<COLOR_SETTINGS*>(
m_colorTheme->GetClientData( m_colorTheme->GetSelection() ) );
if( aPrintAll )
sheetList.BuildSheetList( g_RootSheet );
else
@ -70,7 +73,8 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFile( bool aPrintAll, bool aPrintFrameRef )
bool success = plotOneSheetSVG( m_parent, plotFileName.GetFullPath(), screen,
getModeColor() ? false : true,
aPrintFrameRef );
aPrintFrameRef, m_plotBackgroundColor->GetValue(),
colors );
if( !success )
{
@ -102,15 +106,20 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG( EDA_DRAW_FRAME* aFrame,
const wxString& aFileName,
SCH_SCREEN* aScreen,
bool aPlotBlackAndWhite,
bool aPlotFrameRef )
bool aPlotFrameRef,
bool aPlotBackgroundColor,
COLOR_SETTINGS* aColors )
{
SVG_PLOTTER* plotter = new SVG_PLOTTER();
if( !aColors )
aColors = aFrame->GetColorSettings();
const PAGE_INFO& pageInfo = aScreen->GetPageSettings();
plotter->SetPageSettings( pageInfo );
plotter->SetDefaultLineWidth( GetDefaultLineThickness() );
plotter->SetColorMode( aPlotBlackAndWhite ? false : true );
plotter->SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
plotter->SetColorSettings( aColors );
wxPoint plot_offset;
double scale = 1.0;
// Currently, plot units are in decimil
@ -129,15 +138,26 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG( EDA_DRAW_FRAME* aFrame,
plotter->StartPlot();
if( aPlotBackgroundColor )
{
plotter->SetColor( plotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );
wxPoint end( plotter->PageSettings().GetWidthIU(),
plotter->PageSettings().GetHeightIU() );
plotter->Rect( wxPoint( 0, 0 ), end, FILLED_SHAPE, 1.0 );
}
if( aPlotFrameRef )
{
plotter->SetColor( BLACK );
COLOR4D color = plotter->GetColorMode() ?
plotter->ColorSettings()->GetColor( LAYER_SCHEMATIC_WORKSHEET ) :
COLOR4D::BLACK;
PlotWorkSheet( plotter, aFrame->GetTitleBlock(),
aFrame->GetPageSettings(),
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
aFrame->GetScreenDesc(),
aScreen->GetFileName(),
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
color );
}
aScreen->Plot( plotter );

View File

@ -28,6 +28,8 @@
#include <fctsys.h>
#include <sch_draw_panel.h>
#include <plotter.h>
#include <settings/color_settings.h>
#include <trigo.h>
#include <macros.h>
#include <bitmaps.h>
@ -183,7 +185,8 @@ bool SCH_BITMAP::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy
void SCH_BITMAP::Plot( PLOTTER* aPlotter )
{
m_image->PlotImage( aPlotter, m_pos, GetLayerColor( GetLayer() ), GetPenSize() );
m_image->PlotImage(
aPlotter, m_pos, aPlotter->ColorSettings()->GetColor( GetLayer() ), GetPenSize() );
}

View File

@ -36,6 +36,7 @@
#include <sch_bus_entry.h>
#include <sch_line.h>
#include <sch_text.h>
#include <settings/color_settings.h>
SCH_BUS_ENTRY_BASE::SCH_BUS_ENTRY_BASE( KICAD_T aType, const wxPoint& pos, char shape ) :
@ -351,7 +352,7 @@ bool SCH_BUS_ENTRY_BASE::HitTest( const EDA_RECT& aRect, bool aContained, int aA
void SCH_BUS_ENTRY_BASE::Plot( PLOTTER* aPlotter )
{
aPlotter->SetCurrentLineWidth( GetPenSize() );
aPlotter->SetColor( GetLayerColor( GetLayer() ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( GetLayer() ) );
aPlotter->MoveTo( m_pos );
aPlotter->FinishTo( m_End() );
}

View File

@ -44,6 +44,7 @@
#include <class_library.h>
#include <sch_component.h>
#include <sch_field.h>
#include <settings/color_settings.h>
#include <kicad_string.h>
#include <trace_helpers.h>
@ -432,7 +433,7 @@ void SCH_FIELD::Plot( PLOTTER* aPlotter )
wxCHECK_RET( parent != NULL && parent->Type() == SCH_COMPONENT_T,
wxT( "Cannot plot field with invalid parent." ) );
COLOR4D color = GetLayerColor( GetLayer() );
COLOR4D color = aPlotter->ColorSettings()->GetColor( GetLayer() );
if( !IsVisible() )
return;

View File

@ -39,6 +39,7 @@
#include <sch_junction.h>
#include <netlist_object.h>
#include <sch_connection.h>
#include <settings/color_settings.h>
int SCH_JUNCTION::m_symbolSize = Mils2iu( 40 ); // Default diameter of the junction symbol
@ -194,7 +195,7 @@ bool SCH_JUNCTION::doIsConnected( const wxPoint& aPosition ) const
void SCH_JUNCTION::Plot( PLOTTER* aPlotter )
{
aPlotter->SetColor( GetLayerColor( GetLayer() ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( GetLayer() ) );
aPlotter->Circle( m_pos, GetEffectiveSymbolSize(), FILLED_SHAPE );
}

View File

@ -37,6 +37,7 @@
#include <general.h>
#include <sch_line.h>
#include <sch_edit_frame.h>
#include <settings/color_settings.h>
#include <netlist_object.h>
#include <sch_view.h>
@ -758,7 +759,7 @@ void SCH_LINE::Plot( PLOTTER* aPlotter )
if( m_color != COLOR4D::UNSPECIFIED )
aPlotter->SetColor( m_color );
else
aPlotter->SetColor( GetLayerColor( GetLayer() ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( GetLayer() ) );
aPlotter->SetCurrentLineWidth( GetPenSize() );

View File

@ -38,6 +38,7 @@
#include <general.h>
#include <sch_no_connect.h>
#include <netlist_object.h>
#include <settings/color_settings.h>
SCH_NO_CONNECT::SCH_NO_CONNECT( const wxPoint& pos ) :
@ -193,7 +194,7 @@ void SCH_NO_CONNECT::Plot( PLOTTER* aPlotter )
pY = m_pos.y;
aPlotter->SetCurrentLineWidth( GetPenSize() );
aPlotter->SetColor( GetLayerColor( GetLayer() ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( LAYER_NOCONNECT ) );
aPlotter->MoveTo( wxPoint( pX - delta, pY - delta ) );
aPlotter->FinishTo( wxPoint( pX + delta, pY + delta ) );
aPlotter->MoveTo( wxPoint( pX + delta, pY - delta ) );

View File

@ -34,6 +34,7 @@
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <sch_component.h>
#include <settings/color_settings.h>
#include <netlist_object.h>
#include <trace_helpers.h>
@ -888,7 +889,7 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter )
wxPoint pos_sheetname, pos_filename;
wxPoint pos;
aPlotter->SetColor( GetLayerColor( GetLayer() ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( GetLayer() ) );
int thickness = GetPenSize();
aPlotter->SetCurrentLineWidth( thickness );
@ -932,7 +933,7 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter )
thickness = GetDefaultLineThickness();
thickness = Clamp_Text_PenSize( thickness, size, false );
aPlotter->SetColor( GetLayerColor( LAYER_SHEETNAME ) );
txtcolor = aPlotter->ColorSettings()->GetColor( LAYER_SHEETNAME );
aPlotter->Text( pos_sheetname, txtcolor, wxT( "Sheet: " ) + Text, name_orientation, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM,
@ -947,14 +948,14 @@ void SCH_SHEET::Plot( PLOTTER* aPlotter )
thickness = GetDefaultLineThickness();
thickness = Clamp_Text_PenSize( thickness, size, false );
aPlotter->SetColor( GetLayerColor( LAYER_SHEETFILENAME ) );
txtcolor = aPlotter->ColorSettings()->GetColor( LAYER_SHEETFILENAME );
aPlotter->Text( pos_filename, txtcolor, wxT( "File: " ) + Text, name_orientation, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_TOP,
thickness, italic, false );
}
aPlotter->SetColor( GetLayerColor( GetLayer() ) );
aPlotter->SetColor( aPlotter->ColorSettings()->GetColor( GetLayer() ) );
/* Draw texts : SheetLabel */
for( SCH_SHEET_PIN* sheetPin : m_pins )

View File

@ -43,6 +43,7 @@
#include <sch_text.h>
#include <netlist_object.h>
#include <settings/color_settings.h>
#include <trace_helpers.h>
#include <wx/debug.h>
@ -513,7 +514,7 @@ bool SCH_TEXT::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy )
void SCH_TEXT::Plot( PLOTTER* aPlotter )
{
static std::vector<wxPoint> Poly;
COLOR4D color = GetLayerColor( GetLayer() );
COLOR4D color = aPlotter->ColorSettings()->GetColor( GetLayer() );
int tmp = GetThickness();
int thickness = GetPenSize();

View File

@ -144,7 +144,15 @@ public:
COLOR_SETTINGS* ColorSettings() { return m_colors; }
virtual void SetPageSettings( const PAGE_INFO& aPageSettings );
virtual void SetPageSettings( const PAGE_INFO& aPageSettings )
{
pageInfo = aPageSettings;
}
PAGE_INFO& PageSettings()
{
return pageInfo;
}
/**
* Set the line width for the next drawing.
@ -889,7 +897,6 @@ public:
/** PDF can have multiple pages, so SetPageSettings can be called
* with the outputFile open (but not inside a page stream!) */
virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) override;
virtual void SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror ) override;
virtual void Rect( const wxPoint& p1, const wxPoint& p2, FILL_T fill,