![]() |
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. More... | |
~PLOT_CONTROLLER () | |
Ensure that the last plot is closed. More... | |
PCB_PLOT_PARAMS & | GetPlotOptions () |
Accessor to the plot parameters and options. More... | |
void | SetLayer (LAYER_NUM aLayer) |
LAYER_NUM | GetLayer () |
bool | IsPlotOpen () const |
void | ClosePlot () |
Close the current plot, nothing happens if it isn't open. More... | |
bool | OpenPlotfile (const wxString &aSuffix, PLOT_FORMAT aFormat, const wxString &aSheetDesc) |
Open a new plotfile; works as a factory for plotter objects/. More... | |
bool | PlotLayer () |
Plot a single layer on the current plotfile m_plotLayer is the layer to plot. More... | |
const wxString | GetPlotFileName () |
const wxString | GetPlotDirName () |
void | SetColorMode (bool aColorMode) |
Choose color or bland and white plot mode. More... | |
bool | GetColorMode () |
Private Attributes | |
LAYER_NUM | m_plotLayer |
the layer to plot More... | |
PCB_PLOT_PARAMS | m_plotOptions |
Option bank. More... | |
PLOTTER * | m_plotter |
This is the plotter object; it starts NULL and become instantiated when a plotfile is requested. More... | |
BOARD * | m_board |
The board we're plotting. More... | |
wxFileName | m_plotFile |
The current plot filename, set by OpenPlotfile. More... | |
Batch plotter state object.
Keeps the plot options and handles multiple plot requests. Useful in Python scripts.
Definition at line 44 of file plotcontroller.h.
PLOT_CONTROLLER::PLOT_CONTROLLER | ( | BOARD * | aBoard | ) |
Batch plotter constructor, nothing interesting here.
Definition at line 404 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 412 of file pcbplot.cpp.
References ClosePlot().
void PLOT_CONTROLLER::ClosePlot | ( | ) |
Close the current plot, nothing happens if it isn't open.
Definition at line 421 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 515 of file pcbplot.cpp.
References PLOTTER::GetColorMode(), and m_plotter.
|
inline |
Definition at line 61 of file plotcontroller.h.
References m_plotLayer.
Referenced by OpenPlotfile(), and PlotLayer().
|
inline |
Definition at line 95 of file plotcontroller.h.
References m_plotFile.
|
inline |
Definition at line 90 of file plotcontroller.h.
References m_plotFile.
|
inline |
Accessor to the plot parameters and options.
Definition at line 58 of file plotcontroller.h.
References m_plotOptions.
Referenced by OpenPlotfile(), and PlotLayer().
|
inline |
Definition at line 67 of file plotcontroller.h.
References m_plotter.
bool PLOT_CONTROLLER::OpenPlotfile | ( | const wxString & | aSuffix, |
PLOT_FORMAT | aFormat, | ||
const wxString & | aSheetDesc | ||
) |
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. |
Definition at line 437 of file pcbplot.cpp.
References BuildPlotFileName(), ClosePlot(), EnsureFileDirectoryExists(), ExpandEnvVarSubstitutions(), ExpandTextVars(), GERBER, GetDefaultPlotExtension(), BOARD::GetFileName(), GetGerberProtelExtension(), GetLayer(), 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 491 of file pcbplot.cpp.
References GetLayer(), GetPlotOptions(), m_board, m_plotter, PlotOneBoardLayer(), and ToLAYER_ID().
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 506 of file pcbplot.cpp.
References m_plotter, and PLOTTER::SetColorMode().
|
inline |
|
private |
The board we're plotting.
Definition at line 122 of file plotcontroller.h.
Referenced by OpenPlotfile(), PLOT_CONTROLLER(), and PlotLayer().
|
private |
The current plot filename, set by OpenPlotfile.
Definition at line 125 of file plotcontroller.h.
Referenced by GetPlotDirName(), GetPlotFileName(), and OpenPlotfile().
|
private |
the layer to plot
Definition at line 112 of file plotcontroller.h.
Referenced by GetLayer(), PLOT_CONTROLLER(), and SetLayer().
|
private |
|
private |
This is the plotter object; it starts NULL and become instantiated when a plotfile is requested.
Definition at line 119 of file plotcontroller.h.
Referenced by ClosePlot(), GetColorMode(), IsPlotOpen(), OpenPlotfile(), PLOT_CONTROLLER(), PlotLayer(), and SetColorMode().