KiCad PCB EDA Suite
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). More...
 

Protected Member Functions

int milsToIU (double aMils) const override
 

Convert mils to internal units

More...
 
void setupViewLayers (KIGFX::VIEW &aView, const LSET &aLayerSet) override
 

Enables layers visibility for a printout

More...
 
void setupPainter (KIGFX::PAINTER &aPainter) override
 

Configures PAINTER object for a printout

More...
 
void setupGal (KIGFX::GAL *aGal) override
 

Configures GAL object for a printout

More...
 
EDA_RECT getBoundingBox () override
 

Returns bounding box of the printed objects (excluding worksheet frame)

More...
 
std::unique_ptr< KIGFX::PAINTERgetPainter (KIGFX::GAL *aGal) override
 

Returns a PAINTER instance used to draw the items.

More...
 

Protected Attributes

const KIGFX::VIEWm_view
 

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

More...
 
BOARD_PRINTOUT_SETTINGS m_settings
 

Printout parameters

More...
 

Private Attributes

BOARDm_board
 
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
 

Detailed Description

Definition at line 51 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 70 of file pcbnew_printout.cpp.

71  :
72  BOARD_PRINTOUT( aParams, aView, aTitle ), m_pcbnewSettings( aParams )
73 {
74  m_board = aBoard;
75 }
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
BOARD_PRINTOUT(const BOARD_PRINTOUT_SETTINGS &aParams, const KIGFX::VIEW *aView, const wxString &aTitle)

References m_board.

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 prepare print parameters for the function which actually print the draw layers.

Parameters
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 ptint (only used to print this value)

Definition at line 86 of file board_printout.cpp.

87 {
88  auto dc = GetDC();
90  auto galPrint = KIGFX::GAL_PRINT::Create( options, dc );
91  auto gal = galPrint->GetGAL();
92  auto printCtx = galPrint->GetPrintCtx();
93  auto painter = getPainter( gal );
94  std::unique_ptr<KIGFX::VIEW> view( m_view->DataReference() );
95 
96  // Target paper size
97  wxRect pageSizePx = GetLogicalPageRect();
98  const VECTOR2D pageSizeIn( (double) pageSizePx.width / dc->GetPPI().x,
99  (double) pageSizePx.height / dc->GetPPI().y );
100  galPrint->SetSheetSize( pageSizeIn );
101  const VECTOR2D pageSizeIU( milsToIU( pageSizeIn.x * 1000 ), milsToIU( pageSizeIn.y * 1000 ) );
102 
103  view->SetGAL( gal );
104  view->SetPainter( painter.get() );
105  view->SetScaleLimits( 10e9, 0.0001 );
106  view->SetScale( 1.0 );
107 
108 
109  // Set the color scheme
110  auto dstSettings = view->GetPainter()->GetSettings();
111  dstSettings->LoadColors( m_settings.m_colorSettings );
112 
114  {
115  for( int i = 0; i < LAYER_ID_COUNT; ++i )
116  dstSettings->SetLayerColor( i, COLOR4D::BLACK );
117  }
118  else // color enabled
119  {
120  for( int i = 0; i < LAYER_ID_COUNT; ++i )
121  {
122  // Cairo does not support translucent colors on PostScript surfaces
123  // see 'Features support by the PostScript surface' on
124  // https://www.cairographics.org/documentation/using_the_postscript_surface/
125  dstSettings->SetLayerColor( i, dstSettings->GetLayerColor( i ).WithAlpha( 1.0 ) );
126  }
127  }
128 
130  setupPainter( *painter );
131 
132  auto sheetSizeMils = m_settings.m_pageInfo.GetSizeMils();
133  VECTOR2I sheetSizeIU( milsToIU( sheetSizeMils.GetWidth() ), milsToIU( sheetSizeMils.GetHeight() ) );
134  BOX2I bBox;
135 
136  // Determine printout bounding box
138  {
139  bBox = BOX2I( VECTOR2I( 0, 0 ), VECTOR2I( sheetSizeIU ) );
140  view->SetLayerVisible( LAYER_WORKSHEET, true );
141  }
142  else
143  {
144  EDA_RECT targetBbox = getBoundingBox();
145  bBox = BOX2I( targetBbox.GetOrigin(), targetBbox.GetSize() );
146  view->SetLayerVisible( LAYER_WORKSHEET, false );
147  }
148 
149 
150  // Fit to page
151  if( m_settings.m_scale <= 0.0 )
152  {
153  if( bBox.GetWidth() == 0 || bBox.GetHeight() == 0 )
154  {
155  // Nothing to print
156  m_settings.m_scale = 1.0;
157  }
158  else
159  {
160  double scaleX = (double) pageSizeIU.x / bBox.GetWidth();
161  double scaleY = (double) pageSizeIU.y / bBox.GetHeight();
162  m_settings.m_scale = std::min( scaleX, scaleY );
163  }
164  }
165 
166  view->SetPrintMode( 1 );
167 
168  setupGal( gal );
169  galPrint->SetNativePaperSize( pageSizeIn, printCtx->HasNativeLandscapeRotation() );
170  gal->SetLookAtPoint( bBox.Centre() );
171  gal->SetZoomFactor( m_settings.m_scale );
172 
173  gal->SetClearColor( dstSettings->GetBackgroundColor() );
174  gal->ClearScreen();
175 
176  {
177  KIGFX::GAL_DRAWING_CONTEXT ctx( gal );
178  view->Redraw();
179  }
180 
181  view->SetPrintMode( 0 );
182 }
BOX2< VECTOR2I > BOX2I
Definition: box2.h:522
const PAGE_INFO & m_pageInfo
Definition: printout.h:56
virtual std::unique_ptr< KIGFX::PAINTER > getPainter(KIGFX::GAL *aGal)=0
Returns a PAINTER instance used to draw the items.
const KIGFX::VIEW * m_view
Source VIEW object (note that actual printing only refers to this object)
Definition: color4d.h:44
VECTOR2< int > VECTOR2I
Definition: vector2d.h:594
BOARD_PRINTOUT_SETTINGS m_settings
Printout parameters
double m_scale
Printing scale.
Definition: printout.h:51
COLOR_SETTINGS * m_colorSettings
The color settings to be used for printing.
Definition: printout.h:59
virtual int milsToIU(double aMils) const =0
Convert mils to internal units
virtual void setupPainter(KIGFX::PAINTER &aPainter)
Configures PAINTER object for a printout
const wxPoint GetOrigin() const
Definition: eda_rect.h:114
coord_type GetWidth() const
Definition: box2.h:197
virtual void setupGal(KIGFX::GAL *aGal)
Configures GAL object for a printout
bool PrintBorderAndTitleBlock() const
Returns true if the drawing border and title block should be printed.
Definition: printout.h:64
const wxSize & GetSizeMils() const
Definition: page_info.h:143
#define LAYER_ID_COUNT
Must update this if you add any enums after GerbView!
virtual void setupViewLayers(KIGFX::VIEW &aView, const LSET &aLayerSet)
Enables layers visibility for a printout
bool m_blackWhite
Print in B&W or Color.
Definition: printout.h:53
std::unique_ptr< VIEW > DataReference() const
Returns a new VIEW object that shares the same set of VIEW_ITEMs and LAYERs.
Definition: view.cpp:1467
Vec Centre() const
Definition: box2.h:79
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
coord_type GetHeight() const
Definition: box2.h:198
virtual EDA_RECT getBoundingBox()=0
Returns bounding box of the printed objects (excluding worksheet frame)
LSET m_layerSet
Layers to print.
const wxSize GetSize() const
Definition: eda_rect.h:103

References BLACK, BOX2< Vec >::Centre(), KIGFX::VIEW::DataReference(), BOARD_PRINTOUT::getBoundingBox(), BOX2< Vec >::GetHeight(), EDA_RECT::GetOrigin(), BOARD_PRINTOUT::getPainter(), EDA_RECT::GetSize(), PAGE_INFO::GetSizeMils(), BOX2< Vec >::GetWidth(), LAYER_ID_COUNT, LAYER_WORKSHEET, PRINTOUT_SETTINGS::m_blackWhite, PRINTOUT_SETTINGS::m_colorSettings, 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(), BOARD_PRINTOUT::setupGal(), BOARD_PRINTOUT::setupPainter(), BOARD_PRINTOUT::setupViewLayers(), VECTOR2< T >::x, and VECTOR2< T >::y.

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

◆ getBoundingBox()

EDA_RECT PCBNEW_PRINTOUT::getBoundingBox ( )
overrideprotectedvirtual

Returns bounding box of the printed objects (excluding worksheet frame)

Implements BOARD_PRINTOUT.

Definition at line 259 of file pcbnew_printout.cpp.

260 {
261  return m_board->ComputeBoundingBox();
262 }
EDA_RECT ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Function ComputeBoundingBox calculates the bounding box containing all board items (or board edge seg...

References BOARD::ComputeBoundingBox(), and m_board.

◆ GetPageInfo()

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

Definition at line 76 of file board_printout.cpp.

77 {
78  *minPage = 1;
79  *selPageFrom = 1;
80 
81  *maxPage = m_settings.m_pageCount;
82  *selPageTo = m_settings.m_pageCount;
83 }
BOARD_PRINTOUT_SETTINGS m_settings
Printout parameters
int m_pageCount
Number of pages to print.
Definition: printout.h:54

References PRINTOUT_SETTINGS::m_pageCount, and BOARD_PRINTOUT::m_settings.

◆ getPainter()

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

Returns a PAINTER instance used to draw the items.

Implements BOARD_PRINTOUT.

Definition at line 265 of file pcbnew_printout.cpp.

266 {
267  return std::unique_ptr<KIGFX::PAINTER>( new KIGFX::PCB_PRINT_PAINTER( aGal ) );
268 }
Special flavor of PCB_PAINTER that contains modifications to handle printing options.

◆ HasPage()

bool BOARD_PRINTOUT::HasPage ( int  aPage)
inlineoverrideinherited

Definition at line 78 of file board_printout.h.

79  {
80  return aPage <= m_settings.m_pageCount;
81  }
BOARD_PRINTOUT_SETTINGS m_settings
Printout parameters
int m_pageCount
Number of pages to print.
Definition: printout.h:54

References PRINTOUT_SETTINGS::m_pageCount, and BOARD_PRINTOUT::m_settings.

◆ milsToIU()

int PCBNEW_PRINTOUT::milsToIU ( double  aMils) const
overrideprotectedvirtual

Convert mils to internal units

Implements BOARD_PRINTOUT.

Definition at line 122 of file pcbnew_printout.cpp.

123 {
124  return KiROUND( IU_PER_MILS * aMils );
125 }
#define IU_PER_MILS
Definition: plotter.cpp:138
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:68

References IU_PER_MILS, and KiROUND().

◆ OnPrintPage()

bool PCBNEW_PRINTOUT::OnPrintPage ( int  aPage)
override

Definition at line 78 of file pcbnew_printout.cpp.

79 {
80  // Store the layerset, as it is going to be modified below and the original settings are
81  // needed.
82  LSET lset = m_settings.m_layerSet;
83  int pageCount = lset.count();
84  wxString layerName;
85  PCB_LAYER_ID extractLayer;
86 
87  // compute layer mask from page number if we want one page per layer
89  {
90  // This sequence is TBD, call a different sequencer if needed, such as Seq().
91  // Could not find documentation on page order.
92  LSEQ seq = lset.UIOrder();
93 
94  // aPage starts at 1, not 0
95  if( unsigned( aPage - 1 ) < seq.size() )
96  m_settings.m_layerSet = LSET( seq[aPage - 1] );
97  }
98 
99  if( !m_settings.m_layerSet.any() )
100  return false;
101 
102  extractLayer = m_settings.m_layerSet.ExtractLayer();
103 
104  if( extractLayer == UNDEFINED_LAYER )
105  layerName = _( "Multiple Layers" );
106  else
107  layerName = LSET::Name( extractLayer );
108 
109  // In Pcbnew we can want the layer EDGE always printed
112 
113  DrawPage( layerName, aPage, pageCount );
114 
115  // Restore the original layer set, so the next page can be printed
116  m_settings.m_layerSet = lset;
117 
118  return true;
119 }
bool m_noEdgeLayer
Disable board outline on each page.
virtual void DrawPage(const wxString &aLayerName=wxEmptyString, int aPageNum=1, int aPageCount=1)
Print a page (or a set of pages).
BOARD_PRINTOUT_SETTINGS m_settings
Printout parameters
PCB_LAYER_ID
A quick note on layer IDs:
LSET is a set of PCB_LAYER_IDs.
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Function Name returns the fixed name association with aLayerId.
Definition: lset.cpp:81
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
PCB_LAYER_ID ExtractLayer() const
Find the first set PCB_LAYER_ID.
Definition: lset.cpp:630
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
#define _(s)
Definition: 3d_actions.cpp:33
enum PCBNEW_PRINTOUT_SETTINGS::PAGINATION_T m_pagination
LSEQ UIOrder() const
Definition: lset.cpp:846
LSET m_layerSet
Layers to print.

References _, BOARD_PRINTOUT::DrawPage(), Edge_Cuts, LSET::ExtractLayer(), PCBNEW_PRINTOUT_SETTINGS::LAYER_PER_PAGE, BOARD_PRINTOUT_SETTINGS::m_layerSet, PCBNEW_PRINTOUT_SETTINGS::m_noEdgeLayer, PCBNEW_PRINTOUT_SETTINGS::m_pagination, m_pcbnewSettings, BOARD_PRINTOUT::m_settings, LSET::Name(), LSET::UIOrder(), and UNDEFINED_LAYER.

◆ setupGal()

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

Configures GAL object for a printout

Reimplemented from BOARD_PRINTOUT.

Definition at line 252 of file pcbnew_printout.cpp.

253 {
254  BOARD_PRINTOUT::setupGal( aGal );
255  aGal->SetWorldUnitLength( 1e-9 /* 1 nm */ / 0.0254 /* 1 inch in meters */ );
256 }
virtual void setupGal(KIGFX::GAL *aGal)
Configures GAL object for a printout
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.

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

◆ setupPainter()

void PCBNEW_PRINTOUT::setupPainter ( KIGFX::PAINTER aPainter)
overrideprotectedvirtual

Configures PAINTER object for a printout

Reimplemented from BOARD_PRINTOUT.

Definition at line 222 of file pcbnew_printout.cpp.

223 {
224  BOARD_PRINTOUT::setupPainter( aPainter );
225 
226  KIGFX::PCB_PRINT_PAINTER& painter = dynamic_cast<KIGFX::PCB_PRINT_PAINTER&>( aPainter );
227 
229  {
231  painter.SetDrillMarks( false, 0 );
232  break;
233 
235  painter.SetDrillMarks( false, Millimeter2iu( 0.3 ) );
236  break;
237 
239  painter.SetDrillMarks( true );
240  break;
241  }
242 
245 
249 }
handle color for not plated holes (holes, not pads)
Special flavor of PCB_PAINTER that contains modifications to handle printing options.
to draw via holes (pad holes do not use this layer)
virtual PCB_RENDER_SETTINGS * GetSettings() override
Definition: pcb_painter.h:272
virtual void setupPainter(KIGFX::PAINTER &aPainter)
Configures PAINTER object for a printout
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Function SetLayerColor Changes the color used to draw a layer.
void SetDrawIndividualViaLayers(bool aFlag)
Definition: pcb_painter.h:172
Definition: color4d.h:48
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
enum PCBNEW_PRINTOUT_SETTINGS::PAGINATION_T m_pagination
enum PCBNEW_PRINTOUT_SETTINGS::DRILL_MARK_SHAPE_T m_drillMarks
static constexpr int Millimeter2iu(double mm)
void SetDrillMarks(bool aRealSize, unsigned int aSize=0)
Set drill marks visibility and options.

References PCBNEW_PRINTOUT_SETTINGS::FULL_DRILL_SHAPE, KIGFX::PCB_PAINTER::GetSettings(), LAYER_NON_PLATEDHOLES, LAYER_PADS_PLATEDHOLES, PCBNEW_PRINTOUT_SETTINGS::LAYER_PER_PAGE, LAYER_VIAS_HOLES, PCBNEW_PRINTOUT_SETTINGS::m_drillMarks, PCBNEW_PRINTOUT_SETTINGS::m_pagination, m_pcbnewSettings, Millimeter2iu(), PCBNEW_PRINTOUT_SETTINGS::NO_DRILL_SHAPE, KIGFX::PCB_RENDER_SETTINGS::SetDrawIndividualViaLayers(), KIGFX::PCB_PRINT_PAINTER::SetDrillMarks(), KIGFX::RENDER_SETTINGS::SetLayerColor(), BOARD_PRINTOUT::setupPainter(), PCBNEW_PRINTOUT_SETTINGS::SMALL_DRILL_SHAPE, and WHITE.

◆ setupViewLayers()

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

Enables layers visibility for a printout

Reimplemented from BOARD_PRINTOUT.

Definition at line 128 of file pcbnew_printout.cpp.

129 {
130  BOARD_PRINTOUT::setupViewLayers( aView, aLayerSet );
131 
132  for( LSEQ layerSeq = m_settings.m_layerSet.Seq(); layerSeq; ++layerSeq )
133  {
134  aView.SetLayerVisible( PCBNEW_LAYER_ID_START + *layerSeq, true );
135 
136  // Enable the corresponding zone layer
137  if( IsCopperLayer( *layerSeq ) )
138  aView.SetLayerVisible( LAYER_ZONE_START + *layerSeq, true );
139  }
140 
142  {
143  auto setVisibility = [&]( GAL_LAYER_ID aLayer )
144  {
145  if( m_board->IsElementVisible( aLayer ) )
146  aView.SetLayerVisible( aLayer );
147  };
148 
149  setVisibility( LAYER_MOD_FR );
150  setVisibility( LAYER_MOD_BK );
151  setVisibility( LAYER_MOD_VALUES );
152  setVisibility( LAYER_MOD_REFERENCES );
153  setVisibility( LAYER_MOD_TEXT_FR );
154  setVisibility( LAYER_MOD_TEXT_BK );
155  setVisibility( LAYER_MOD_TEXT_INVISIBLE );
156  setVisibility( LAYER_PAD_FR );
157  setVisibility( LAYER_PAD_BK );
158  setVisibility( LAYER_PADS_TH );
159 
160  setVisibility( LAYER_TRACKS );
161  setVisibility( LAYER_VIAS );
162 
163  setVisibility( LAYER_NO_CONNECTS );
164  setVisibility( LAYER_DRC_WARNING );
165  setVisibility( LAYER_DRC_ERROR );
166  setVisibility( LAYER_DRC_EXCLUSION );
167  setVisibility( LAYER_ANCHOR );
168  setVisibility( LAYER_WORKSHEET );
169  setVisibility( LAYER_GRID );
170 
171  // Keep certain items always enabled and just rely on either the finer or coarser
172  // visibility controls
173  const int alwaysEnabled[] = {
175  };
176 
177  for( int item : alwaysEnabled )
178  aView.SetLayerVisible( item, true );
179  }
180  else
181  {
182  // Enable pad layers corresponding to the selected copper layers
183  if( aLayerSet.test( F_Cu ) )
184  aView.SetLayerVisible( LAYER_PAD_FR, true );
185 
186  if( aLayerSet.test( B_Cu ) )
187  aView.SetLayerVisible( LAYER_PAD_BK, true );
188 
189  if( ( aLayerSet & LSET::AllCuMask() ).any() ) // Items visible on any copper layer
190  {
191  // Enable items on copper layers, but do not draw holes
192  for( GAL_LAYER_ID item : { LAYER_PADS_TH, LAYER_VIAS } )
193  {
194  aView.SetLayerVisible( item, true );
195  }
196 
198  {
199  // Enable hole layers to draw drill marks
201  LAYER_VIAS_HOLES } )
202  {
203  aView.SetLayerVisible( holeLayer, true );
204  aView.SetTopLayer( holeLayer, true );
205  }
206  }
207  }
208 
209  // Keep certain items always enabled/disabled and just rely on the layer visibility
210  const int alwaysEnabled[] = {
214  };
215 
216  for( int item : alwaysEnabled )
217  aView.SetLayerVisible( item, true );
218  }
219 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Function AllCuMask returns a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:719
Virtual layers for stacking zones and tracks on a given copper layer.
to draw blind/buried vias
show a marker on pads with no nets
virtual void SetTopLayer(int aLayer, bool aEnabled=true)
Function SetTopLayer() Sets given layer to be displayed on the top or sets back the default order of ...
Definition: view.cpp:856
multilayer pads, usually with holes
handle color for not plated holes (holes, not pads)
anchor of items having an anchor point (texts, footprints)
Control for copper zone opacity/visibility (color ignored)
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
to draw via holes (pad holes do not use this layer)
show modules values (when texts are visibles)
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Function Seq returns an LSEQ from the union of this LSET and a desired sequence.
Definition: lset.cpp:380
BOARD_PRINTOUT_SETTINGS m_settings
Printout parameters
show modules on front
Meta control for all pads opacity/visibility (color ignored)
to draw usual through hole vias
void SetLayerVisible(int aLayer, bool aVisible=true)
Function SetLayerVisible() Controls the visibility of a particular layer.
Definition: view.h:388
bool m_asItemCheckboxes
Honor checkboxes in the Items tab of the Layers Manager.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
virtual void setupViewLayers(KIGFX::VIEW &aView, const LSET &aLayerSet)
Enables layers visibility for a printout
layer for drc markers which have been individually excluded
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Function IsElementVisible tests whether a given element category is visible.
layer for drc markers with SEVERITY_WARNING
smd pads, front layer
Meta control for all vias opacity/visibility.
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
bool IsCopperLayer(LAYER_NUM aLayerId)
Function IsCopperLayer tests whether a layer is a copper layer.
enum PCBNEW_PRINTOUT_SETTINGS::DRILL_MARK_SHAPE_T m_drillMarks
show modules references (when texts are visibles)
layer for drc markers with SEVERITY_ERROR
LSET m_layerSet
Layers to print.

References LSET::AllCuMask(), B_Cu, F_Cu, IsCopperLayer(), BOARD::IsElementVisible(), LAYER_ANCHOR, LAYER_DRC_ERROR, LAYER_DRC_EXCLUSION, LAYER_DRC_WARNING, LAYER_GRID, LAYER_MOD_BK, LAYER_MOD_FR, LAYER_MOD_REFERENCES, LAYER_MOD_TEXT_BK, LAYER_MOD_TEXT_FR, LAYER_MOD_TEXT_INVISIBLE, LAYER_MOD_VALUES, LAYER_NO_CONNECTS, LAYER_NON_PLATEDHOLES, LAYER_PAD_BK, LAYER_PAD_FR, LAYER_PADS, LAYER_PADS_PLATEDHOLES, LAYER_PADS_TH, LAYER_TRACKS, LAYER_VIA_BBLIND, LAYER_VIA_MICROVIA, LAYER_VIA_THROUGH, LAYER_VIAS, LAYER_VIAS_HOLES, LAYER_WORKSHEET, LAYER_ZONE_START, LAYER_ZONES, PCBNEW_PRINTOUT_SETTINGS::m_asItemCheckboxes, m_board, PCBNEW_PRINTOUT_SETTINGS::m_drillMarks, BOARD_PRINTOUT_SETTINGS::m_layerSet, m_pcbnewSettings, BOARD_PRINTOUT::m_settings, PCBNEW_PRINTOUT_SETTINGS::NO_DRILL_SHAPE, PCBNEW_LAYER_ID_START, LSET::Seq(), KIGFX::VIEW::SetLayerVisible(), KIGFX::VIEW::SetTopLayer(), and BOARD_PRINTOUT::setupViewLayers().

Member Data Documentation

◆ m_board

BOARD* PCBNEW_PRINTOUT::m_board
private

Definition at line 73 of file pcbnew_printout.h.

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

◆ m_pcbnewSettings

PCBNEW_PRINTOUT_SETTINGS PCBNEW_PRINTOUT::m_pcbnewSettings
private

Definition at line 75 of file pcbnew_printout.h.

Referenced by OnPrintPage(), 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 114 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: