KiCad PCB EDA Suite
|
#include <pcbnew_printout.h>
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 |
Configures PAINTER object for a printout. | |
void | setupPainter (KIGFX::PAINTER &aPainter) override |
Configures GAL 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::PAINTER > | getPainter (KIGFX::GAL *aGal) override |
Source VIEW object (note that actual printing only refers to this object) | |
Protected Attributes | |
const KIGFX::VIEW * | m_view |
Printout parameters. | |
BOARD_PRINTOUT_SETTINGS | m_settings |
bool | m_gerbviewPrint |
True if the caller is Gerbview, false for Pcbnew. | |
Private Attributes | |
BOARD * | m_board |
PCBNEW_PRINTOUT_SETTINGS | m_pcbnewSettings |
Definition at line 50 of file pcbnew_printout.h.
PCBNEW_PRINTOUT::PCBNEW_PRINTOUT | ( | BOARD * | aBoard, |
const PCBNEW_PRINTOUT_SETTINGS & | aParams, | ||
const KIGFX::VIEW * | aView, | ||
const wxString & | aTitle | ||
) |
Definition at line 82 of file pcbnew_printout.cpp.
References m_board.
|
virtualinherited |
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 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 GERBVIEW_PRINTOUT::OnPrintPage(), and OnPrintPage().
|
overrideprotectedvirtual |
Returns a PAINTER instance used to draw the items.
Implements BOARD_PRINTOUT.
Definition at line 279 of file pcbnew_printout.cpp.
References BOARD::ComputeBoundingBox(), and m_board.
|
overrideinherited |
Definition at line 79 of file board_printout.cpp.
References PRINTOUT_SETTINGS::m_pageCount, and BOARD_PRINTOUT::m_settings.
|
overrideprotectedvirtual |
Source VIEW object (note that actual printing only refers to this object)
Implements BOARD_PRINTOUT.
Definition at line 285 of file pcbnew_printout.cpp.
|
inlineoverrideinherited |
Definition at line 77 of file board_printout.h.
References PRINTOUT_SETTINGS::m_pageCount, and BOARD_PRINTOUT::m_settings.
|
overrideprotectedvirtual |
< Convert mils to internal units
Enables layers visibility for a printout
Implements BOARD_PRINTOUT.
Definition at line 134 of file pcbnew_printout.cpp.
References EDA_IU_SCALE::IU_PER_MILS, KiROUND(), and pcbIUScale.
|
override |
Definition at line 90 of file pcbnew_printout.cpp.
References _, BOARD_PRINTOUT::DrawPage(), Edge_Cuts, LSET::ExtractLayer(), BOARD::GetLayerName(), PCBNEW_PRINTOUT_SETTINGS::LAYER_PER_PAGE, m_board, BOARD_PRINTOUT_SETTINGS::m_LayerSet, PCBNEW_PRINTOUT_SETTINGS::m_Pagination, m_pcbnewSettings, PCBNEW_PRINTOUT_SETTINGS::m_PrintEdgeCutsOnAllPages, BOARD_PRINTOUT::m_settings, BASE_SET::set(), LSET::UIOrder(), and UNDEFINED_LAYER.
|
overrideprotectedvirtual |
Returns bounding box of the printed objects (excluding drawing-sheet frame)
Reimplemented from BOARD_PRINTOUT.
Definition at line 272 of file pcbnew_printout.cpp.
References EDA_IU_SCALE::IU_PER_MM, pcbIUScale, BOARD_PRINTOUT::setupGal(), and KIGFX::GAL::SetWorldUnitLength().
|
overrideprotectedvirtual |
Configures GAL object for a printout.
Reimplemented from BOARD_PRINTOUT.
Definition at line 241 of file pcbnew_printout.cpp.
References ADVANCED_CFG::GetCfg(), KIGFX::PCB_PAINTER::GetSettings(), LAYER_NON_PLATEDHOLES, LAYER_PAD_PLATEDHOLES, LAYER_VIA_HOLES, PCBNEW_PRINTOUT_SETTINGS::m_DrillMarks, m_pcbnewSettings, ADVANCED_CFG::m_SmallDrillMarkSize, EDA_IU_SCALE::mmToIU(), pcbIUScale, KIGFX::PCB_PRINT_PAINTER::SetDrillMarks(), KIGFX::RENDER_SETTINGS::SetLayerColor(), and BOARD_PRINTOUT::setupPainter().
|
overrideprotectedvirtual |
Configures PAINTER object for a printout.
Reimplemented from BOARD_PRINTOUT.
Definition at line 140 of file pcbnew_printout.cpp.
References LSET::AllCuMask(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), BOARD::IsElementVisible(), LAYER_ANCHOR, LAYER_DRAWINGSHEET, LAYER_DRC_ERROR, LAYER_DRC_EXCLUSION, LAYER_DRC_SHAPE1, LAYER_DRC_SHAPE2, LAYER_DRC_WARNING, LAYER_FOOTPRINTS_BK, LAYER_FOOTPRINTS_FR, LAYER_FP_REFERENCES, LAYER_FP_TEXT, LAYER_FP_VALUES, LAYER_GRID, LAYER_NON_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_PAD_PLATEDHOLES, LAYER_PADS, LAYER_SHAPES, LAYER_TRACKS, LAYER_VIA_BBLIND, LAYER_VIA_HOLES, LAYER_VIA_HOLEWALLS, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, LAYER_VIAS, LAYER_ZONE_START, LAYER_ZONES, PCBNEW_PRINTOUT_SETTINGS::m_AsItemCheckboxes, PRINTOUT_SETTINGS::m_blackWhite, m_board, PCBNEW_PRINTOUT_SETTINGS::m_DrillMarks, BOARD_PRINTOUT_SETTINGS::m_LayerSet, m_pcbnewSettings, BOARD_PRINTOUT::m_settings, PCBNEW_LAYER_ID_START, LSET::Seq(), KIGFX::RENDER_SETTINGS::SetLayerColor(), KIGFX::VIEW::SetLayerVisible(), KIGFX::VIEW::SetTopLayer(), and BOARD_PRINTOUT::setupViewLayers().
|
private |
Definition at line 72 of file pcbnew_printout.h.
Referenced by getBoundingBox(), OnPrintPage(), PCBNEW_PRINTOUT(), and setupViewLayers().
|
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::GERBVIEW_PRINTOUT().
|
private |
Definition at line 73 of file pcbnew_printout.h.
Referenced by OnPrintPage(), setupPainter(), and setupViewLayers().
|
protectedinherited |
Definition at line 118 of file board_printout.h.
Referenced by BOARD_PRINTOUT::DrawPage(), BOARD_PRINTOUT::GetPageInfo(), BOARD_PRINTOUT::HasPage(), GERBVIEW_PRINTOUT::OnPrintPage(), OnPrintPage(), BOARD_PRINTOUT::setupGal(), BOARD_PRINTOUT::setupPainter(), GERBVIEW_PRINTOUT::setupViewLayers(), and setupViewLayers().
|
protectedinherited |
Printout parameters.
Definition at line 115 of file board_printout.h.
Referenced by BOARD_PRINTOUT::BOARD_PRINTOUT(), and BOARD_PRINTOUT::DrawPage().