Eeschema: use worksheet color when plotting
Fixes: lp:1825568
* https://bugs.launchpad.net/kicad/+bug/1825568
(cherry picked from commit e35be13b23
)
This commit is contained in:
parent
15cf25a6fc
commit
b40289c1bd
|
@ -53,13 +53,17 @@ wxString GetDefaultPlotExtension( PlotFormat aFormat )
|
||||||
|
|
||||||
void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
||||||
const PAGE_INFO& aPageInfo, int aSheetNumber, int aNumberOfSheets,
|
const PAGE_INFO& aPageInfo, int aSheetNumber, int aNumberOfSheets,
|
||||||
const wxString &aSheetDesc, const wxString &aFilename )
|
const wxString &aSheetDesc, const wxString &aFilename, const COLOR4D aColor )
|
||||||
{
|
{
|
||||||
/* Note: Page sizes values are given in mils
|
/* Note: Page sizes values are given in mils
|
||||||
*/
|
*/
|
||||||
double iusPerMil = plotter->GetIUsPerDecimil() * 10.0;
|
double iusPerMil = plotter->GetIUsPerDecimil() * 10.0;
|
||||||
|
|
||||||
COLOR4D plotColor = plotter->GetColorMode() ? COLOR4D( RED ) : COLOR4D::BLACK;
|
COLOR4D plotColor = plotter->GetColorMode() ? aColor : COLOR4D::BLACK;
|
||||||
|
|
||||||
|
if( plotColor == COLOR4D::UNSPECIFIED )
|
||||||
|
plotColor = COLOR4D( RED );
|
||||||
|
|
||||||
plotter->SetColor( plotColor );
|
plotter->SetColor( plotColor );
|
||||||
WS_DRAW_ITEM_LIST drawList;
|
WS_DRAW_ITEM_LIST drawList;
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,8 @@ bool DIALOG_PLOT_SCHEMATIC::PlotOneSheetDXF( const wxString& aFileName,
|
||||||
m_parent->GetPageSettings(),
|
m_parent->GetPageSettings(),
|
||||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||||
m_parent->GetScreenDesc(),
|
m_parent->GetScreenDesc(),
|
||||||
aScreen->GetFileName() );
|
aScreen->GetFileName(),
|
||||||
|
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
aScreen->Plot( plotter );
|
aScreen->Plot( plotter );
|
||||||
|
|
|
@ -208,7 +208,8 @@ bool DIALOG_PLOT_SCHEMATIC::Plot_1_Page_HPGL( const wxString& aFileName,
|
||||||
m_parent->GetPageSettings(),
|
m_parent->GetPageSettings(),
|
||||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||||
m_parent->GetScreenDesc(),
|
m_parent->GetScreenDesc(),
|
||||||
aScreen->GetFileName() );
|
aScreen->GetFileName(),
|
||||||
|
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
|
||||||
|
|
||||||
aScreen->Plot( plotter );
|
aScreen->Plot( plotter );
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <base_units.h>
|
#include <base_units.h>
|
||||||
#include <sch_sheet_path.h>
|
#include <sch_sheet_path.h>
|
||||||
#include <project.h>
|
#include <project.h>
|
||||||
|
#include <general.h>
|
||||||
|
|
||||||
#include <reporter.h>
|
#include <reporter.h>
|
||||||
|
|
||||||
|
@ -153,7 +154,8 @@ void DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF( PLOTTER* aPlotter,
|
||||||
m_parent->GetPageSettings(),
|
m_parent->GetPageSettings(),
|
||||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||||
m_parent->GetScreenDesc(),
|
m_parent->GetScreenDesc(),
|
||||||
aScreen->GetFileName() );
|
aScreen->GetFileName(),
|
||||||
|
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
aScreen->Plot( aPlotter );
|
aScreen->Plot( aPlotter );
|
||||||
|
|
|
@ -162,7 +162,8 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetPS( const wxString& aFileName,
|
||||||
m_parent->GetPageSettings(),
|
m_parent->GetPageSettings(),
|
||||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||||
m_parent->GetScreenDesc(),
|
m_parent->GetScreenDesc(),
|
||||||
aScreen->GetFileName() );
|
aScreen->GetFileName(),
|
||||||
|
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
aScreen->Plot( plotter );
|
aScreen->Plot( plotter );
|
||||||
|
|
|
@ -136,7 +136,8 @@ bool DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG( EDA_DRAW_FRAME* aFrame,
|
||||||
aFrame->GetPageSettings(),
|
aFrame->GetPageSettings(),
|
||||||
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
aScreen->m_ScreenNumber, aScreen->m_NumberOfScreens,
|
||||||
aFrame->GetScreenDesc(),
|
aFrame->GetScreenDesc(),
|
||||||
aScreen->GetFileName() );
|
aScreen->GetFileName(),
|
||||||
|
GetLayerColor( ( SCH_LAYER_ID )LAYER_WORKSHEET ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
aScreen->Plot( plotter );
|
aScreen->Plot( plotter );
|
||||||
|
|
|
@ -1352,7 +1352,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
||||||
const PAGE_INFO& aPageInfo,
|
const PAGE_INFO& aPageInfo,
|
||||||
int aSheetNumber, int aNumberOfSheets,
|
int aSheetNumber, int aNumberOfSheets,
|
||||||
const wxString &aSheetDesc,
|
const wxString &aSheetDesc,
|
||||||
const wxString &aFilename );
|
const wxString &aFilename,
|
||||||
|
const COLOR4D aColor = COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
/** Returns the default plot extension for a format
|
/** Returns the default plot extension for a format
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue