KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCBNEW_PRINTOUT Class Reference

#include <pcbnew_printout.h>

Inheritance diagram for PCBNEW_PRINTOUT:
BOARD_PRINTOUT

Public Member Functions

 PCBNEW_PRINTOUT (BOARD *aBoard, const PCBNEW_PRINTOUT_SETTINGS &aParams, const KIGFX::VIEW *aView, const wxString &aTitle)
 
bool OnPrintPage (int aPage) override
 
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

int milsToIU (double aMils) const override
 Convert mils to internal units.
 
void setupViewLayers (KIGFX::VIEW &aView, const LSET &aLayerSet) override
 Enable layers visibility for a printout.
 
void setupPainter (KIGFX::PAINTER &aPainter) override
 Configure #PAINTER object for a printout.
 
void setupGal (KIGFX::GAL *aGal) override
 Configure GAL object for a printout.
 
BOX2I getBoundingBox () override
 Return bounding box of the printed objects (excluding drawing-sheet frame).
 
std::unique_ptr< KIGFX::PAINTERgetPainter (KIGFX::GAL *aGal) override
 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.
 

Private Attributes

BOARDm_board
 
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
 

Detailed Description

Definition at line 50 of file pcbnew_printout.h.

Constructor & Destructor Documentation

◆ PCBNEW_PRINTOUT()

PCBNEW_PRINTOUT::PCBNEW_PRINTOUT ( BOARD * aBoard,
const PCBNEW_PRINTOUT_SETTINGS & aParams,
const KIGFX::VIEW * aView,
const wxString & aTitle )

Definition at line 65 of file pcbnew_printout.cpp.

References BOARD_PRINTOUT::BOARD_PRINTOUT(), m_board, and m_pcbnewSettings.

Member Function Documentation

◆ DrawPage()

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

◆ getBoundingBox()

BOX2I PCBNEW_PRINTOUT::getBoundingBox ( )
overrideprotectedvirtual

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

Implements BOARD_PRINTOUT.

Definition at line 263 of file pcbnew_printout.cpp.

References m_board.

◆ GetPageInfo()

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

Definition at line 79 of file board_printout.cpp.

References m_settings.

◆ getPainter()

std::unique_ptr< KIGFX::PAINTER > PCBNEW_PRINTOUT::getPainter ( KIGFX::GAL * aGal)
overrideprotectedvirtual

Return the #PAINTER instance used to draw the items.

Implements BOARD_PRINTOUT.

Definition at line 269 of file pcbnew_printout.cpp.

◆ HasPage()

bool BOARD_PRINTOUT::HasPage ( int aPage)
inlineoverrideinherited

Definition at line 77 of file board_printout.h.

References m_settings.

◆ milsToIU()

int PCBNEW_PRINTOUT::milsToIU ( double aMils) const
overrideprotectedvirtual

Convert mils to internal units.

Implements BOARD_PRINTOUT.

Definition at line 117 of file pcbnew_printout.cpp.

References KiROUND(), and pcbIUScale.

◆ OnPrintPage()

bool PCBNEW_PRINTOUT::OnPrintPage ( int aPage)
override

◆ setupGal()

void PCBNEW_PRINTOUT::setupGal ( KIGFX::GAL * aGal)
overrideprotectedvirtual

Configure GAL object for a printout.

Reimplemented from BOARD_PRINTOUT.

Definition at line 256 of file pcbnew_printout.cpp.

References pcbIUScale, BOARD_PRINTOUT::setupGal(), and KIGFX::GAL::SetWorldUnitLength().

◆ setupPainter()

◆ setupViewLayers()

Member Data Documentation

◆ m_board

BOARD* PCBNEW_PRINTOUT::m_board
private

Definition at line 72 of file pcbnew_printout.h.

Referenced by getBoundingBox(), OnPrintPage(), PCBNEW_PRINTOUT(), and setupViewLayers().

◆ m_gerbviewPrint

bool BOARD_PRINTOUT::m_gerbviewPrint
protectedinherited

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_pcbnewSettings

PCBNEW_PRINTOUT_SETTINGS PCBNEW_PRINTOUT::m_pcbnewSettings
private

Definition at line 73 of file pcbnew_printout.h.

Referenced by OnPrintPage(), PCBNEW_PRINTOUT(), setupPainter(), and setupViewLayers().

◆ m_settings

◆ m_view

const KIGFX::VIEW* BOARD_PRINTOUT::m_view
protectedinherited

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: