KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BOARD_PRINTOUT Class Referenceabstract

An object derived from wxPrintout to handle the necessary information to control a printer when printing a board. More...

#include <board_printout.h>

Inheritance diagram for BOARD_PRINTOUT:
GERBVIEW_PRINTOUT PCBNEW_PRINTOUT

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::PAINTERgetPainter (KIGFX::GAL *aGal)=0
 Return the #PAINTER instance used to draw the items.
 

Protected Attributes

const KIGFX::VIEWm_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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BOARD_PRINTOUT()

BOARD_PRINTOUT::BOARD_PRINTOUT ( const BOARD_PRINTOUT_SETTINGS & aParams,
const KIGFX::VIEW * aView,
const wxString & aTitle )

◆ ~BOARD_PRINTOUT()

virtual BOARD_PRINTOUT::~BOARD_PRINTOUT ( )
inlinevirtual

Definition at line 73 of file board_printout.h.

Member Function Documentation

◆ DrawPage()

void BOARD_PRINTOUT::DrawPage ( const wxString & aLayerName = wxEmptyString,
int aPageNum = 1,
int aPageCount = 1 )
virtual

◆ getBoundingBox()

virtual BOX2I BOARD_PRINTOUT::getBoundingBox ( )
protectedpure virtual

Return bounding box of the printed objects (excluding drawing-sheet frame).

Implemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.

Referenced by DrawPage().

◆ GetPageInfo()

void BOARD_PRINTOUT::GetPageInfo ( int * minPage,
int * maxPage,
int * selPageFrom,
int * selPageTo )
override

Definition at line 79 of file board_printout.cpp.

References m_settings.

◆ getPainter()

virtual std::unique_ptr< KIGFX::PAINTER > BOARD_PRINTOUT::getPainter ( KIGFX::GAL * aGal)
protectedpure virtual

Return the #PAINTER instance used to draw the items.

Implemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.

Referenced by DrawPage().

◆ HasPage()

bool BOARD_PRINTOUT::HasPage ( int aPage)
inlineoverride

Definition at line 77 of file board_printout.h.

References m_settings.

◆ milsToIU()

virtual int BOARD_PRINTOUT::milsToIU ( double aMils) const
protectedpure virtual

Convert mils to internal units.

Implemented in GERBVIEW_PRINTOUT, and PCBNEW_PRINTOUT.

Referenced by DrawPage().

◆ setupGal()

void BOARD_PRINTOUT::setupGal ( KIGFX::GAL * aGal)
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().

◆ setupPainter()

void BOARD_PRINTOUT::setupPainter ( KIGFX::PAINTER & aPainter)
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().

◆ setupViewLayers()

void BOARD_PRINTOUT::setupViewLayers ( KIGFX::VIEW & aView,
const LSET & aLayerSet )
protectedvirtual

Member Data Documentation

◆ m_gerbviewPrint

bool BOARD_PRINTOUT::m_gerbviewPrint
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().

◆ m_settings

◆ m_view

const KIGFX::VIEW* BOARD_PRINTOUT::m_view
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().


The documentation for this class was generated from the following files: