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
 Configures PAINTER object for a printout.
 
void setupGal (KIGFX::GAL *aGal) override
 Returns bounding box of the printed objects (excluding drawing-sheet frame)
 
BOX2I getBoundingBox () override
 Returns a PAINTER instance used to draw the items.
 
std::unique_ptr< KIGFX::PAINTERgetPainter (KIGFX::GAL *aGal) override
 Source VIEW object (note that actual printing only refers to this object)
 
virtual void setupPainter (KIGFX::PAINTER &aPainter)
 Configures GAL object for a printout.
 

Protected Attributes

const KIGFX::VIEWm_view
 Printout parameters.
 
BOARD_PRINTOUT_SETTINGS m_settings
 
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 
)

Definition at line 40 of file gerbview_printout.cpp.

References BOARD_PRINTOUT::m_gerbviewPrint, and m_layout.

Member Function Documentation

◆ DrawPage()

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

Print a page (or a set of pages).

Note
This function prepares the print parameters for the function which actually prints the draw layers.
Parameters
aLayerNamea text which can be printed as layer name.
aPageNumthe number of the current page (only used to print this value).
aPageCountthe number of pages to print (only used to print this value).

Definition at line 89 of file board_printout.cpp.

References BOX2< Vec >::Centre(), KIGFX::GAL::ClearScreen(), KIGFX::GAL_PRINT::Create(), KIGFX::VIEW::DataReference(), KIGFX::RENDER_SETTINGS::GetBackgroundColor(), BOARD_PRINTOUT::getBoundingBox(), BOX2< Vec >::GetHeight(), KIGFX::RENDER_SETTINGS::GetLayerColor(), BOARD_PRINTOUT::getPainter(), PAGE_INFO::GetSizeMils(), BOX2< Vec >::GetWidth(), KIGFX::PRINT_CONTEXT::HasNativeLandscapeRotation(), LAYER_DRAWINGSHEET, LAYER_ID_COUNT, KIGFX::RENDER_SETTINGS::LoadColors(), PRINTOUT_SETTINGS::m_blackWhite, PRINTOUT_SETTINGS::m_colorSettings, BOARD_PRINTOUT::m_gerbviewPrint, BOARD_PRINTOUT_SETTINGS::m_LayerSet, PRINTOUT_SETTINGS::m_pageInfo, PRINTOUT_SETTINGS::m_scale, BOARD_PRINTOUT::m_settings, BOARD_PRINTOUT::m_view, BOARD_PRINTOUT::milsToIU(), PRINTOUT_SETTINGS::PrintBorderAndTitleBlock(), 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(), BOARD_PRINTOUT::setupGal(), BOARD_PRINTOUT::setupPainter(), BOARD_PRINTOUT::setupViewLayers(), KIGFX::GAL::SetZoomFactor(), KIGFX::COLOR4D::WithAlpha(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by OnPrintPage(), and PCBNEW_PRINTOUT::OnPrintPage().

◆ getBoundingBox()

BOX2I GERBVIEW_PRINTOUT::getBoundingBox ( )
overrideprotectedvirtual

Returns a PAINTER instance used to draw the items.

Implements BOARD_PRINTOUT.

Definition at line 102 of file gerbview_printout.cpp.

References GBR_LAYOUT::ComputeBoundingBox(), and m_layout.

◆ GetPageInfo()

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

◆ getPainter()

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

Source VIEW object (note that actual printing only refers to this object)

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 PRINTOUT_SETTINGS::m_pageCount, and BOARD_PRINTOUT::m_settings.

◆ milsToIU()

int GERBVIEW_PRINTOUT::milsToIU ( double  aMils) const
overrideprotectedvirtual

< Convert mils to internal units

Enables layers visibility for a printout

Implements BOARD_PRINTOUT.

Definition at line 80 of file gerbview_printout.cpp.

References gerbIUScale, EDA_IU_SCALE::IU_PER_MILS, and KiROUND().

◆ OnPrintPage()

◆ setupGal()

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

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

Reimplemented from BOARD_PRINTOUT.

Definition at line 95 of file gerbview_printout.cpp.

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

◆ setupPainter()

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

◆ setupViewLayers()

void GERBVIEW_PRINTOUT::setupViewLayers ( KIGFX::VIEW aView,
const LSET aLayerSet 
)
overrideprotectedvirtual

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::BOARD_PRINTOUT(), BOARD_PRINTOUT::DrawPage(), and 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

Printout parameters.

Definition at line 115 of file board_printout.h.

Referenced by BOARD_PRINTOUT::BOARD_PRINTOUT(), and BOARD_PRINTOUT::DrawPage().


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