| 
    KiCad PCB EDA Suite
    
   | 
 
An object derived from wxPrintout to handle the necessary information to control a printer when printing a board. More...
#include <board_printout.h>
  
Public Member Functions | |
| BOARD_PRINTOUT (const BOARD_PRINTOUT_SETTINGS &aParams, const KIGFX::VIEW *aView, const wxString &aTitle) | |
| virtual | ~BOARD_PRINTOUT () | 
| void | GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) override | 
| bool | HasPage (int aPage) override | 
| virtual void | DrawPage (const wxString &aLayerName=wxEmptyString, int aPageNum=1, int aPageCount=1) | 
| Print a page (or a set of pages).   | |
Protected Member Functions | |
| virtual int | milsToIU (double aMils) const =0 | 
| Convert mils to internal units.   | |
| virtual void | setupViewLayers (KIGFX::VIEW &aView, const LSET &aLayerSet) | 
| Enable layers visibility for a printout.   | |
| virtual void | setupPainter (KIGFX::PAINTER &aPainter) | 
| Configure #PAINTER object for a printout.   | |
| virtual void | setupGal (KIGFX::GAL *aGal) | 
| Configure GAL object for a printout.   | |
| virtual BOX2I | getBoundingBox ()=0 | 
| Return bounding box of the printed objects (excluding drawing-sheet frame).   | |
| virtual std::unique_ptr< KIGFX::PAINTER > | getPainter (KIGFX::GAL *aGal)=0 | 
| Return the #PAINTER instance used to draw the items.   | |
Protected Attributes | |
| const KIGFX::VIEW * | m_view | 
| Source VIEW object (note that actual printing only refers to this object).   | |
| BOARD_PRINTOUT_SETTINGS | m_settings | 
| Printout parameters.   | |
| bool | m_gerbviewPrint | 
| True if the caller is Gerbview, false for Pcbnew.   | |
An object derived from wxPrintout to handle the necessary information to control a printer when printing a board.
Definition at line 67 of file board_printout.h.
| BOARD_PRINTOUT::BOARD_PRINTOUT | ( | const BOARD_PRINTOUT_SETTINGS & | aParams, | 
| const KIGFX::VIEW * | aView, | ||
| const wxString & | aTitle ) | 
Definition at line 69 of file board_printout.cpp.
References m_gerbviewPrint, m_settings, and m_view.
Referenced by GERBVIEW_PRINTOUT::GERBVIEW_PRINTOUT(), and PCBNEW_PRINTOUT::PCBNEW_PRINTOUT().
      
  | 
  inlinevirtual | 
Definition at line 73 of file board_printout.h.
      
  | 
  virtual | 
Print a page (or a set of pages).
| aLayerName | a text which can be printed as layer name. | 
| aPageNum | the number of the current page (only used to print this value). | 
| aPageCount | the number of pages to print (only used to print this value). | 
Definition at line 89 of file board_printout.cpp.
References COLOR4D::BLACK, BOX2< Vec >::Centre(), KIGFX::GAL::ClearScreen(), KIGFX::GAL_PRINT::Create(), KIGFX::RENDER_SETTINGS::GetBackgroundColor(), getBoundingBox(), BOX2< Vec >::GetHeight(), KIGFX::RENDER_SETTINGS::GetLayerColor(), getPainter(), KIGFX::GAL::GetScreenPixelSize(), BOX2< Vec >::GetWidth(), KIGFX::PRINT_CONTEXT::HasNativeLandscapeRotation(), LAYER_DRAWINGSHEET, LAYER_ID_COUNT, KIGFX::RENDER_SETTINGS::LoadColors(), m_gerbviewPrint, m_settings, m_view, milsToIU(), KIGFX::GAL::ResizeScreen(), KIGFX::RENDER_SETTINGS::SetBackgroundColor(), KIGFX::GAL::SetClearColor(), KIGFX::RENDER_SETTINGS::SetIsPrinting(), KIGFX::RENDER_SETTINGS::SetLayerColor(), KIGFX::RENDER_SETTINGS::SetLayerName(), KIGFX::GAL::SetLookAtPoint(), KIGFX::RENDER_SETTINGS::SetPrintLayers(), setupGal(), setupPainter(), setupViewLayers(), KIGFX::GAL::SetZoomFactor(), COLOR4D::WHITE, KIGFX::COLOR4D::WithAlpha(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by GERBVIEW_PRINTOUT::OnPrintPage(), and PCBNEW_PRINTOUT::OnPrintPage().
      
  | 
  protectedpure virtual | 
Return bounding box of the printed objects (excluding drawing-sheet frame).
Implemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.
Referenced by DrawPage().
      
  | 
  override | 
Definition at line 79 of file board_printout.cpp.
References m_settings.
      
  | 
  protectedpure virtual | 
Return the #PAINTER instance used to draw the items.
Implemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.
Referenced by DrawPage().
      
  | 
  inlineoverride | 
Definition at line 77 of file board_printout.h.
References m_settings.
      
  | 
  protectedpure virtual | 
Convert mils to internal units.
Implemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.
Referenced by DrawPage().
      
  | 
  protectedvirtual | 
Configure GAL object for a printout.
Reimplemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.
Definition at line 218 of file board_printout.cpp.
References m_settings, and KIGFX::GAL::SetFlip().
Referenced by DrawPage(), GERBVIEW_PRINTOUT::setupGal(), and PCBNEW_PRINTOUT::setupGal().
      
  | 
  protectedvirtual | 
Configure #PAINTER object for a printout.
Reimplemented in PCBNEW_PRINTOUT.
Definition at line 211 of file board_printout.cpp.
References KIGFX::PAINTER::GetSettings(), m_settings, KIGFX::RENDER_SETTINGS::SetBackgroundColor(), and COLOR4D::WHITE.
Referenced by DrawPage(), and PCBNEW_PRINTOUT::setupPainter().
      
  | 
  protectedvirtual | 
Enable layers visibility for a printout.
Reimplemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.
Definition at line 199 of file board_printout.cpp.
References KIGFX::VIEW::SetLayerTarget(), KIGFX::VIEW::SetLayerVisible(), KIGFX::VIEW::SetTopLayer(), KIGFX::TARGET_NONCACHED, and KIGFX::VIEW::VIEW_MAX_LAYERS.
Referenced by DrawPage(), GERBVIEW_PRINTOUT::setupViewLayers(), and PCBNEW_PRINTOUT::setupViewLayers().
      
  | 
  protected | 
True if the caller is Gerbview, false for Pcbnew.
Definition at line 121 of file board_printout.h.
Referenced by BOARD_PRINTOUT(), DrawPage(), and GERBVIEW_PRINTOUT::GERBVIEW_PRINTOUT().
      
  | 
  protected | 
Printout parameters.
Definition at line 118 of file board_printout.h.
Referenced by BOARD_PRINTOUT(), DrawPage(), GetPageInfo(), HasPage(), GERBVIEW_PRINTOUT::OnPrintPage(), PCBNEW_PRINTOUT::OnPrintPage(), setupGal(), setupPainter(), GERBVIEW_PRINTOUT::setupViewLayers(), and PCBNEW_PRINTOUT::setupViewLayers().
      
  | 
  protected | 
Source VIEW object (note that actual printing only refers to this object).
Definition at line 115 of file board_printout.h.
Referenced by BOARD_PRINTOUT(), and DrawPage().