KiCad PCB EDA Suite
|
Batch plotter state object. More...
#include <plotcontroller.h>
Public Member Functions | |
PLOT_CONTROLLER (BOARD *aBoard) | |
Batch plotter constructor, nothing interesting here. | |
~PLOT_CONTROLLER () | |
Ensure that the last plot is closed. | |
PCB_PLOT_PARAMS & | GetPlotOptions () |
Accessor to the plot parameters and options. | |
void | SetLayer (int aLayer) |
int | GetLayer () |
bool | IsPlotOpen () const |
void | ClosePlot () |
Close the current plot, nothing happens if it isn't open. | |
bool | OpenPlotfile (const wxString &aSuffix, PLOT_FORMAT aFormat, const wxString &aSheetName=wxEmptyString, const wxString &aSheetPath=wxEmptyString) |
Open a new plotfile; works as a factory for plotter objects/. | |
bool | PlotLayer () |
Plot a single layer on the current plotfile m_plotLayer is the layer to plot. | |
bool | PlotLayers (const LSEQ &aLayerSequence) |
Plot a sequence of board layer IDs in the given order. | |
const wxString | GetPlotFileName () |
const wxString | GetPlotDirName () |
void | SetColorMode (bool aColorMode) |
Choose color or bland and white plot mode. | |
bool | GetColorMode () |
PLOTTER * | GetPlotter () |
Private Attributes | |
int | m_plotLayer |
PCB_PLOT_PARAMS | m_plotOptions |
PLOTTER * | m_plotter |
This is the plotter object; it starts NULL and become instantiated when a plotfile is. | |
BOARD * | m_board |
wxFileName | m_plotFile |
Batch plotter state object.
Keeps the plot options and handles multiple plot requests. Useful in Python scripts.
Definition at line 45 of file plotcontroller.h.
PLOT_CONTROLLER::PLOT_CONTROLLER | ( | BOARD * | aBoard | ) |
Batch plotter constructor, nothing interesting here.
Definition at line 411 of file pcbplot.cpp.
References m_board, m_plotLayer, m_plotter, and UNDEFINED_LAYER.
PLOT_CONTROLLER::~PLOT_CONTROLLER | ( | ) |
Ensure that the last plot is closed.
Definition at line 419 of file pcbplot.cpp.
References ClosePlot().
void PLOT_CONTROLLER::ClosePlot | ( | ) |
Close the current plot, nothing happens if it isn't open.
Definition at line 429 of file pcbplot.cpp.
References PLOTTER::EndPlot(), m_plotter, and PLOTTER::RenderSettings().
Referenced by OpenPlotfile(), and ~PLOT_CONTROLLER().
bool PLOT_CONTROLLER::GetColorMode | ( | ) |
Definition at line 541 of file pcbplot.cpp.
References PLOTTER::GetColorMode(), and m_plotter.
|
inline |
Definition at line 62 of file plotcontroller.h.
References m_plotLayer.
Referenced by OpenPlotfile(), and PlotLayer().
|
inline |
Definition at line 109 of file plotcontroller.h.
References m_plotFile.
|
inline |
Definition at line 104 of file plotcontroller.h.
References m_plotFile.
|
inline |
Accessor to the plot parameters and options.
Definition at line 59 of file plotcontroller.h.
References m_plotOptions.
Referenced by OpenPlotfile(), PlotLayer(), and PlotLayers().
|
inline |
Definition at line 124 of file plotcontroller.h.
References m_plotter.
|
inline |
Definition at line 68 of file plotcontroller.h.
References m_plotter.
bool PLOT_CONTROLLER::OpenPlotfile | ( | const wxString & | aSuffix, |
PLOT_FORMAT | aFormat, | ||
const wxString & | aSheetName = wxEmptyString , |
||
const wxString & | aSheetPath = wxEmptyString |
||
) |
Open a new plotfile; works as a factory for plotter objects/.
aSuffix | is a string added to the base filename (derived from the board filename) to identify the plot file. |
aFormat | is the plot file format identifier. |
aSheetName | is the text to be displayed in the title block that replaces ${SHEETNAME} |
aSheetPath | is the text to be displayed in the title block that replaces ${SHEETPATH} |
Definition at line 445 of file pcbplot.cpp.
References BuildPlotFileName(), ClosePlot(), EnsureFileDirectoryExists(), ExpandEnvVarSubstitutions(), ExpandTextVars(), GetDefaultPlotExtension(), BOARD::GetFileName(), GetGerberProtelExtension(), GetLayer(), BOARD::GetLayerName(), PCB_PLOT_PARAMS::GetOutputDirectory(), GetPlotOptions(), m_board, m_plotFile, m_plotter, BOARD::ResolveTextVar(), PCB_PLOT_PARAMS::SetFormat(), StartPlotBoard(), and ToLAYER_ID().
bool PLOT_CONTROLLER::PlotLayer | ( | ) |
Plot a single layer on the current plotfile m_plotLayer is the layer to plot.
Definition at line 502 of file pcbplot.cpp.
References GetLayer(), GetPlotOptions(), m_board, m_plotter, PlotInteractiveLayer(), PlotOneBoardLayer(), and ToLAYER_ID().
bool PLOT_CONTROLLER::PlotLayers | ( | const LSEQ & | aLayerSequence | ) |
Plot a sequence of board layer IDs in the given order.
aLayerSequence | is the sequence of layer IDs to plot. |
Definition at line 517 of file pcbplot.cpp.
References GetPlotOptions(), m_board, m_plotter, PlotBoardLayers(), and PlotInteractiveLayer().
void PLOT_CONTROLLER::SetColorMode | ( | bool | aColorMode | ) |
Choose color or bland and white plot mode.
aColorMode | set to true to activate the plot color mode or false for black and white. |
Definition at line 532 of file pcbplot.cpp.
References m_plotter, and PLOTTER::SetColorMode().
|
inline |
Definition at line 61 of file plotcontroller.h.
References m_plotLayer.
|
private |
Definition at line 134 of file plotcontroller.h.
Referenced by OpenPlotfile(), PLOT_CONTROLLER(), PlotLayer(), and PlotLayers().
|
private |
Definition at line 135 of file plotcontroller.h.
Referenced by GetPlotDirName(), GetPlotFileName(), and OpenPlotfile().
|
private |
Definition at line 127 of file plotcontroller.h.
Referenced by GetLayer(), PLOT_CONTROLLER(), and SetLayer().
|
private |
Definition at line 128 of file plotcontroller.h.
Referenced by GetPlotOptions().
|
private |
This is the plotter object; it starts NULL and become instantiated when a plotfile is.
Definition at line 132 of file plotcontroller.h.
Referenced by ClosePlot(), GetColorMode(), GetPlotter(), IsPlotOpen(), OpenPlotfile(), PLOT_CONTROLLER(), PlotLayer(), PlotLayers(), and SetColorMode().