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

#include <gerbview_printout.h>

Inheritance diagram for GERBVIEW_PRINTOUT:
BOARD_PRINTOUT

Public Member Functions

 GERBVIEW_PRINTOUT (GBR_LAYOUT *aLayout, const BOARD_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 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.
 
virtual void setupPainter (KIGFX::PAINTER &aPainter)
 Configure #PAINTER object for a printout.
 

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

GBR_LAYOUTm_layout
 

Detailed Description

Definition at line 28 of file gerbview_printout.h.

Constructor & Destructor Documentation

◆ GERBVIEW_PRINTOUT()

GERBVIEW_PRINTOUT::GERBVIEW_PRINTOUT ( GBR_LAYOUT * aLayout,
const BOARD_PRINTOUT_SETTINGS & aParams,
const KIGFX::VIEW * aView,
const wxString & aTitle )

Member Function Documentation

◆ DrawPage()

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

◆ getBoundingBox()

BOX2I GERBVIEW_PRINTOUT::getBoundingBox ( )
overrideprotectedvirtual

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

Implements BOARD_PRINTOUT.

Definition at line 102 of file gerbview_printout.cpp.

References m_layout.

◆ 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 > GERBVIEW_PRINTOUT::getPainter ( KIGFX::GAL * aGal)
overrideprotectedvirtual

Return the #PAINTER instance used to draw the items.

Implements BOARD_PRINTOUT.

Definition at line 108 of file gerbview_printout.cpp.

◆ HasPage()

bool BOARD_PRINTOUT::HasPage ( int aPage)
inlineoverrideinherited

Definition at line 77 of file board_printout.h.

References m_settings.

◆ milsToIU()

int GERBVIEW_PRINTOUT::milsToIU ( double aMils) const
overrideprotectedvirtual

Convert mils to internal units.

Implements BOARD_PRINTOUT.

Definition at line 80 of file gerbview_printout.cpp.

References gerbIUScale, and KiROUND().

◆ OnPrintPage()

bool GERBVIEW_PRINTOUT::OnPrintPage ( int aPage)
override

◆ setupGal()

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

Configure GAL object for a printout.

Reimplemented from BOARD_PRINTOUT.

Definition at line 95 of file gerbview_printout.cpp.

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

◆ setupPainter()

void BOARD_PRINTOUT::setupPainter ( KIGFX::PAINTER & aPainter)
protectedvirtualinherited

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 GERBVIEW_PRINTOUT::setupViewLayers ( KIGFX::VIEW & aView,
const LSET & aLayerSet )
overrideprotectedvirtual

Enable layers visibility for a printout.

Reimplemented from BOARD_PRINTOUT.

Definition at line 86 of file gerbview_printout.cpp.

References GERBVIEW_LAYER_ID_START, BOARD_PRINTOUT::m_settings, KIGFX::VIEW::SetLayerVisible(), and BOARD_PRINTOUT::setupViewLayers().

Member Data Documentation

◆ 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_layout

GBR_LAYOUT* GERBVIEW_PRINTOUT::m_layout
private

Definition at line 48 of file gerbview_printout.h.

Referenced by GERBVIEW_PRINTOUT(), and getBoundingBox().

◆ 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: