| 
    KiCad PCB EDA Suite
    
   | 
 
Schematic plotting class. More...
#include <sch_plotter.h>
Public Member Functions | |
| SCH_PLOTTER (SCH_EDIT_FRAME *aFrame) | |
| Constructor for usage with a frame having the schematic we want to print loaded.   | |
| SCH_PLOTTER (SCHEMATIC *aSch) | |
| Constructor for usage with a schematic that can be headless.   | |
| void | Plot (PLOT_FORMAT aPlotFormat, const SCH_PLOT_OPTS &aPlotOpts, SCH_RENDER_SETTINGS *aRenderSettings, REPORTER *aReporter=nullptr) | 
| Perform the plotting of the schematic using the given aPlotFormat and a\ aPlotSettings.   | |
| wxString | GetLastOutputFilePath () const | 
| Get the last output file path, this is mainly intended for PDFs with the open after plot GUI option.   | |
Protected Member Functions | |
| wxFileName | getOutputFilenameSingle (const SCH_PLOT_OPTS &aPlotOpts, REPORTER *aReporter, const wxString &ext) | 
| Return the output filename for formats where the output is a single file.   | |
| void | createPDFFile (const SCH_PLOT_OPTS &aPlotOpts, SCH_RENDER_SETTINGS *aRenderSettings, REPORTER *aReporter) | 
| void | plotOneSheetPDF (PLOTTER *aPlotter, SCH_SCREEN *aScreen, const SCH_PLOT_OPTS &aPlotOpts) | 
| void | setupPlotPagePDF (PLOTTER *aPlotter, SCH_SCREEN *aScreen, const SCH_PLOT_OPTS &aPlotOpts) | 
| void | createDXFFiles (const SCH_PLOT_OPTS &aPlotOpts, SCH_RENDER_SETTINGS *aRenderSettings, REPORTER *aReporter) | 
| bool | plotOneSheetDXF (const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, const VECTOR2I &aPlotOffset, double aScale, const SCH_PLOT_OPTS &aPlotOpts) | 
| void | createPSFiles (const SCH_PLOT_OPTS &aPlotOpts, SCH_RENDER_SETTINGS *aRenderSettings, REPORTER *aReporter) | 
| bool | plotOneSheetPS (const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, const PAGE_INFO &aPageInfo, const VECTOR2I &aPlot0ffset, double aScale, const SCH_PLOT_OPTS &aPlotOpts) | 
| void | createSVGFiles (const SCH_PLOT_OPTS &aPlotOpts, SCH_RENDER_SETTINGS *aRenderSettings, REPORTER *aReporter) | 
| bool | plotOneSheetSVG (const wxString &aFileName, SCH_SCREEN *aScreen, RENDER_SETTINGS *aRenderSettings, const SCH_PLOT_OPTS &aPlotOpts) | 
| void | restoreEnvironment (PDF_PLOTTER *aPlotter, SCH_SHEET_PATH &aOldsheetpath) | 
| Everything done, close the plot and restore the environment.   | |
| wxFileName | createPlotFileName (const SCH_PLOT_OPTS &aPlotOpts, const wxString &aPlotFileName, const wxString &aExtension, REPORTER *aReporter=nullptr) | 
| Create a file name with an absolute path name.   | |
Private Attributes | |
| SCHEMATIC * | m_schematic | 
| COLOR_SETTINGS * | m_colorSettings | 
| wxString | m_lastOutputFilePath | 
Schematic plotting class.
Definition at line 97 of file sch_plotter.h.
| SCH_PLOTTER::SCH_PLOTTER | ( | SCH_EDIT_FRAME * | aFrame | ) | 
Constructor for usage with a frame having the schematic we want to print loaded.
Definition at line 57 of file sch_plotter.cpp.
References m_colorSettings, and m_schematic.
| SCH_PLOTTER::SCH_PLOTTER | ( | SCHEMATIC * | aSch | ) | 
Constructor for usage with a schematic that can be headless.
Definition at line 50 of file sch_plotter.cpp.
References m_colorSettings, and m_schematic.
      
  | 
  protected | 
Definition at line 669 of file sch_plotter.cpp.
References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), DXF_PLOTTER::GetDefaultFileExtension(), m_lastOutputFilePath, SCH_PLOT_OPTS::m_plotAll, SCH_PLOT_OPTS::m_plotPages, m_schematic, plotOneSheetDXF(), REPORTER::Report(), REPORTER::ReportTail(), restoreEnvironment(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SCH_SHEET_LIST::SortByPageNumbers(), SCH_SHEET_LIST::TrimToPageNumbers(), and IO_ERROR::What().
Referenced by Plot().
      
  | 
  protected | 
Definition at line 87 of file sch_plotter.cpp.
References _, SCH_SHEET_LIST::BuildSheetList(), PDF_PLOTTER::ClosePage(), ExpandTextVars(), PDF_PLOTTER::GetDefaultFileExtension(), SCH_SHEET::GetField(), getOutputFilenameSingle(), SCH_SHEET_PATH::GetPageNumber(), SCH_FIELD::GetShownText(), SCH_SHEET_PATH::Last(), SCH_PLOT_OPTS::m_blackAndWhite, m_lastOutputFilePath, SCH_PLOT_OPTS::m_PDFMetadata, SCH_PLOT_OPTS::m_plotAll, SCH_PLOT_OPTS::m_plotPages, m_schematic, PDF_PLOTTER::OpenFile(), plotOneSheetPDF(), SCH_SHEET_PATH::pop_back(), REPORTER::Report(), REPORTER::ReportTail(), restoreEnvironment(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, PLOTTER::SetAuthor(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetRenderSettings(), PLOTTER::SetSubject(), PLOTTER::SetTitle(), setupPlotPagePDF(), SHEET_NAME, SCH_SHEET_PATH::size(), SCH_SHEET_LIST::SortByHierarchicalPageNumbers(), PDF_PLOTTER::StartPage(), PDF_PLOTTER::StartPlot(), SCH_SHEET_LIST::TrimToPageNumbers(), and IO_ERROR::What().
Referenced by Plot().
      
  | 
  protected | 
Create a file name with an absolute path name.
| aPlotFileName | the name for the file to plot without a path. | 
| aExtension | the extension for the file to plot. | 
| aReporter | a point to a REPORTER object use to show messages (can be NULL). | 
| IO_ERROR | on file I/O errors. | 
Definition at line 833 of file sch_plotter.cpp.
References _, EnsureFileDirectoryExists(), SCH_PLOT_OPTS::m_outputDirectory, SCHEMATIC_SETTINGS::m_PlotDirectoryName, m_schematic, REPORTER::Report(), RPT_SEVERITY_ERROR, and tracePathsAndFiles.
Referenced by createDXFFiles(), createPSFiles(), createSVGFiles(), and getOutputFilenameSingle().
      
  | 
  protected | 
Definition at line 310 of file sch_plotter.cpp.
References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), PS_PLOTTER::GetDefaultFileExtension(), PAGE_INFO::GetHeightMils(), SCH_SCREEN::GetPageSettings(), PAGE_INFO::GetWidthMils(), PAGE_INFO::IsPortrait(), m_lastOutputFilePath, SCH_PLOT_OPTS::m_pageSizeSelect, SCH_PLOT_OPTS::m_plotAll, SCH_PLOT_OPTS::m_plotPages, m_schematic, PAGE_SIZE_A, PAGE_SIZE_A4, PAGE_SIZE_AUTO, plotOneSheetPS(), REPORTER::Report(), REPORTER::ReportTail(), restoreEnvironment(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, scale, PAGE_INFO::SetPortrait(), PAGE_INFO::SetType(), SCH_SHEET_LIST::SortByPageNumbers(), SCH_SHEET_LIST::TrimToPageNumbers(), and IO_ERROR::What().
Referenced by Plot().
      
  | 
  protected | 
Definition at line 491 of file sch_plotter.cpp.
References _, SCH_SHEET_LIST::BuildSheetList(), createPlotFileName(), SVG_PLOTTER::GetDefaultFileExtension(), m_lastOutputFilePath, SCH_PLOT_OPTS::m_plotAll, SCH_PLOT_OPTS::m_plotPages, m_schematic, plotOneSheetSVG(), REPORTER::Report(), REPORTER::ReportTail(), restoreEnvironment(), RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SCH_SHEET_LIST::SortByPageNumbers(), SCH_SHEET_LIST::TrimToPageNumbers(), and IO_ERROR::What().
Referenced by Plot().
      
  | 
  inline | 
Get the last output file path, this is mainly intended for PDFs with the open after plot GUI option.
Definition at line 125 of file sch_plotter.h.
References m_lastOutputFilePath.
Referenced by DIALOG_PRINT::TransferDataFromWindow().
      
  | 
  protected | 
Return the output filename for formats where the output is a single file.
Definition at line 64 of file sch_plotter.cpp.
References createPlotFileName(), SCH_PLOT_OPTS::m_outputFile, and m_schematic.
Referenced by createPDFFile().
| void SCH_PLOTTER::Plot | ( | PLOT_FORMAT | aPlotFormat, | 
| const SCH_PLOT_OPTS & | aPlotOpts, | ||
| SCH_RENDER_SETTINGS * | aRenderSettings, | ||
| REPORTER * | aReporter = nullptr ) | 
Perform the plotting of the schematic using the given aPlotFormat and a\ aPlotSettings.
| aPlotFormat | The resulting output plot format (PDF, SVG, DXF, etc) | 
| aPlotSettings | The configuration for the plotting operation | 
| aRenderSettings | Mandatory object containing render settings for lower level classes | 
| aReporter | Optional reporter to print messages to | 
Definition at line 875 of file sch_plotter.cpp.
References createDXFFiles(), createPDFFile(), createPSFiles(), createSVGFiles(), DXF, GetColorSettings(), HPGL, m_colorSettings, SCH_PLOT_OPTS::m_theme, PDF, POST, and SVG.
Referenced by DIALOG_PRINT::TransferDataFromWindow().
      
  | 
  protected | 
Definition at line 763 of file sch_plotter.cpp.
References COLOR4D::BLACK, color, DXF_PLOTTER::EndPlot(), PLOTTER::GetColorMode(), SCH_SCREEN::GetFileName(), KIGFX::RENDER_SETTINGS::GetLayerColor(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_SCREEN::GetPageSettings(), SCHEMATIC::GetProperties(), SCH_SCREEN::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), LAYER_SCHEMATIC_DRAWINGSHEET, KIGFX::RENDER_SETTINGS::LoadColors(), SCH_PLOT_OPTS::m_blackAndWhite, m_colorSettings, SCH_PLOT_OPTS::m_DXF_File_Unit, SCH_PLOT_OPTS::m_plotDrawingSheet, m_schematic, PLOTTER::OpenFile(), SCH_SCREEN::Plot(), PlotDrawingSheet(), PLOTTER::RenderSettings(), SCH_SCREEN::Schematic(), schIUScale, PLOTTER::SetColorMode(), PLOTTER::SetCreator(), KIGFX::RENDER_SETTINGS::SetDefaultPenWidth(), PLOTTER::SetPageSettings(), PLOTTER::SetRenderSettings(), DXF_PLOTTER::SetUnits(), DXF_PLOTTER::SetViewport(), and DXF_PLOTTER::StartPlot().
Referenced by createDXFFiles().
      
  | 
  protected | 
Definition at line 236 of file sch_plotter.cpp.
References COLOR4D::BLACK, color, end, FILLED_SHAPE, KIGFX::RENDER_SETTINGS::GetBackgroundColor(), PLOTTER::GetColorMode(), SCH_SCREEN::GetFileName(), PAGE_INFO::GetHeightIU(), KIGFX::RENDER_SETTINGS::GetLayerColor(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_SCREEN::GetPageSettings(), SCHEMATIC::GetProperties(), SCH_SCREEN::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), PAGE_INFO::GetWidthIU(), LAYER_SCHEMATIC_DRAWINGSHEET, SCH_PLOT_OPTS::m_plotDrawingSheet, m_schematic, SCH_PLOT_OPTS::m_useBackgroundColor, SCH_SCREEN::Plot(), PlotDrawingSheet(), SCHEMATIC::Project(), PLOTTER::Rect(), PLOTTER::RenderSettings(), SCH_SCREEN::Schematic(), schIUScale, and PLOTTER::SetColor().
Referenced by createPDFFile().
      
  | 
  protected | 
Definition at line 432 of file sch_plotter.cpp.
References COLOR4D::BLACK, color, end, PS_PLOTTER::EndPlot(), FILLED_SHAPE, PLOTTER::GetColorMode(), SCH_SCREEN::GetFileName(), PAGE_INFO::GetHeightIU(), KIGFX::RENDER_SETTINGS::GetLayerColor(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_SCREEN::GetPageSettings(), SCHEMATIC::GetProperties(), SCH_SCREEN::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), PAGE_INFO::GetWidthIU(), LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_DRAWINGSHEET, SCH_PLOT_OPTS::m_blackAndWhite, SCH_PLOT_OPTS::m_plotDrawingSheet, m_schematic, SCH_PLOT_OPTS::m_useBackgroundColor, PLOTTER::OpenFile(), SCH_SCREEN::Plot(), PlotDrawingSheet(), SCHEMATIC::Project(), PS_PLOTTER::Rect(), PLOTTER::RenderSettings(), SCH_SCREEN::Schematic(), schIUScale, PSLIKE_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), PLOTTER::SetRenderSettings(), PS_PLOTTER::SetViewport(), and PS_PLOTTER::StartPlot().
Referenced by createPSFiles().
      
  | 
  protected | 
Definition at line 583 of file sch_plotter.cpp.
References COLOR4D::BLACK, color, end, SVG_PLOTTER::EndPlot(), FILLED_SHAPE, PLOTTER::GetColorMode(), SCH_SCREEN::GetFileName(), PAGE_INFO::GetHeightIU(), PAGE_INFO::GetHeightMils(), KIGFX::RENDER_SETTINGS::GetLayerColor(), BASE_SCREEN::GetPageCount(), BASE_SCREEN::GetPageNumber(), SCH_SCREEN::GetPageSettings(), SCHEMATIC::GetProperties(), SCH_SCREEN::GetTitleBlock(), BASE_SCREEN::GetVirtualPageNumber(), PAGE_INFO::GetWidthIU(), PAGE_INFO::GetWidthMils(), PAGE_INFO::IsPortrait(), LAYER_SCHEMATIC_BACKGROUND, LAYER_SCHEMATIC_DRAWINGSHEET, SCH_PLOT_OPTS::m_blackAndWhite, SCH_PLOT_OPTS::m_pageSizeSelect, SCH_PLOT_OPTS::m_plotDrawingSheet, m_schematic, SCH_PLOT_OPTS::m_useBackgroundColor, PLOTTER::OpenFile(), PAGE_SIZE_A, PAGE_SIZE_A4, PAGE_SIZE_AUTO, SCH_SCREEN::Plot(), PlotDrawingSheet(), SCHEMATIC::Project(), SVG_PLOTTER::Rect(), PLOTTER::RenderSettings(), scale, SCH_SCREEN::Schematic(), schIUScale, PSLIKE_PLOTTER::SetColor(), PLOTTER::SetColorMode(), PLOTTER::SetCreator(), PLOTTER::SetPageSettings(), PAGE_INFO::SetPortrait(), PLOTTER::SetRenderSettings(), PAGE_INFO::SetType(), SVG_PLOTTER::SetViewport(), and SVG_PLOTTER::StartPlot().
Referenced by createSVGFiles().
      
  | 
  protected | 
Everything done, close the plot and restore the environment.
| aPlotter | the plotter to close and destroy (can be null if no current active plotter) | 
| aOldsheetpath | the stored old sheet path for the current sheet before the plot started | 
Definition at line 818 of file sch_plotter.cpp.
References PDF_PLOTTER::EndPlot(), and m_schematic.
Referenced by createDXFFiles(), createPDFFile(), createPSFiles(), and createSVGFiles().
      
  | 
  protected | 
Definition at line 274 of file sch_plotter.cpp.
References PAGE_INFO::GetHeightMils(), SCH_SCREEN::GetPageSettings(), PAGE_INFO::GetWidthMils(), PAGE_INFO::IsPortrait(), SCH_PLOT_OPTS::m_pageSizeSelect, PAGE_SIZE_A, PAGE_SIZE_A4, PAGE_SIZE_AUTO, scale, schIUScale, PLOTTER::SetPageSettings(), PAGE_INFO::SetPortrait(), PAGE_INFO::SetType(), and PLOTTER::SetViewport().
Referenced by createPDFFile().
      
  | 
  private | 
Definition at line 185 of file sch_plotter.h.
Referenced by Plot(), plotOneSheetDXF(), SCH_PLOTTER(), and SCH_PLOTTER().
      
  | 
  private | 
Definition at line 186 of file sch_plotter.h.
Referenced by createDXFFiles(), createPDFFile(), createPSFiles(), createSVGFiles(), and GetLastOutputFilePath().
      
  | 
  private | 
Definition at line 184 of file sch_plotter.h.
Referenced by createDXFFiles(), createPDFFile(), createPlotFileName(), createPSFiles(), createSVGFiles(), getOutputFilenameSingle(), plotOneSheetDXF(), plotOneSheetPDF(), plotOneSheetPS(), plotOneSheetSVG(), restoreEnvironment(), SCH_PLOTTER(), and SCH_PLOTTER().