90 const KIGFX::VIEW* aView,
const wxString& aTitle ) :
91 BOARD_PRINTOUT( aParams, aView, aTitle ), m_pcbnewSettings( aParams )
102 int pageCount = lset.count();
114 if(
unsigned( aPage - 1 ) < seq.size() )
124 layerName =
_(
"Multiple Layers" );
132 DrawPage( layerName, aPage, pageCount );
164 COLOR4D invisible_color = COLOR4D::UNSPECIFIED;
215 const int alwaysEnabled[] =
224 for(
int layer : alwaysEnabled )
258 case DRILL_MARKS::NO_DRILL_SHAPE:
262 case DRILL_MARKS::SMALL_DRILL_SHAPE:
270 case DRILL_MARKS::FULL_DRILL_SHAPE:
296 return std::make_unique<KIGFX::PCB_PRINT_PAINTER>( aGal );
302 m_drillMarkReal( false ),
315 if( m_drillMarkReal )
constexpr EDA_IU_SCALE pcbIUScale
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
BASE_SET & set(size_t pos)
An object derived from wxPrintout to handle the necessary information to control a printer when print...
virtual void DrawPage(const wxString &aLayerName=wxEmptyString, int aPageNum=1, int aPageCount=1)
Print a page (or a set of pages).
virtual void setupPainter(KIGFX::PAINTER &aPainter)
Configure #PAINTER object for a printout.
virtual void setupViewLayers(KIGFX::VIEW &aView, const LSET &aLayerSet)
Enable layers visibility for a printout.
virtual void setupGal(KIGFX::GAL *aGal)
Configure #GAL object for a printout.
BOARD_PRINTOUT_SETTINGS m_settings
Printout parameters.
Information pertinent to a Pcbnew printed circuit board.
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Test whether a given element category is visible.
BOX2I ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
A color representation with 4 components: red, green, blue, alpha.
Abstract interface for drawing on a 2D-surface.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
Contains all the knowledge about how to draw graphical object onto any particular output device.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Contains methods for drawing PCB-specific items.
virtual SHAPE_SEGMENT getPadHoleShape(const PAD *aPad) const
Return hole shape for a pad (internal units).
virtual PCB_RENDER_SETTINGS * GetSettings() override
Return a pointer to current settings that are going to be used when drawing items.
virtual PAD_DRILL_SHAPE getDrillShape(const PAD *aPad) const
Return drill shape of a pad.
virtual int getViaDrillSize(const PCB_VIA *aVia) const
Return drill diameter for a via (internal units).
Special flavor of PCB_PAINTER that contains modifications to handle printing options.
void SetDrillMarks(bool aRealSize, unsigned int aSize=0)
Set drill marks visibility and options.
SHAPE_SEGMENT getPadHoleShape(const PAD *aPad) const override
Return hole shape for a pad (internal units).
PCB_PRINT_PAINTER(GAL *aGal)
int getViaDrillSize(const PCB_VIA *aVia) const override
Return drill diameter for a via (internal units).
PAD_DRILL_SHAPE getDrillShape(const PAD *aPad) const override
Return drill shape of a pad.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Change the color used to draw a layer.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
virtual void SetTopLayer(int aLayer, bool aEnabled=true)
Set given layer to be displayed on the top or sets back the default order of layers.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
LSET is a set of PCB_LAYER_IDs.
LSEQ UIOrder() const
Return the copper, technical and user layers in the order shown in layer widget.
PCB_LAYER_ID ExtractLayer() const
Find the first set PCB_LAYER_ID.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
VECTOR2I GetPosition() const override
Describe the page size and margins of a paper page on which to eventually print or plot.
int milsToIU(double aMils) const override
Convert mils to internal units.
bool OnPrintPage(int aPage) override
std::unique_ptr< KIGFX::PAINTER > getPainter(KIGFX::GAL *aGal) override
Return the #PAINTER instance used to draw the items.
void setupGal(KIGFX::GAL *aGal) override
Configure #GAL object for a printout.
PCBNEW_PRINTOUT(BOARD *aBoard, const PCBNEW_PRINTOUT_SETTINGS &aParams, const KIGFX::VIEW *aView, const wxString &aTitle)
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
void setupPainter(KIGFX::PAINTER &aPainter) override
Configure #PAINTER object for a printout.
BOX2I getBoundingBox() override
Return bounding box of the printed objects (excluding drawing-sheet frame).
void setupViewLayers(KIGFX::VIEW &aView, const LSET &aLayerSet) override
Enable layers visibility for a printout.
virtual SETTINGS_MANAGER & GetSettingsManager() const
T * GetAppSettings(const wxString &aFilename)
Return a handle to the a given settings by type.
double m_SmallDrillMarkSize
The diameter of the drill marks on print and plot outputs (in mm) when the "Drill marks" option is se...
constexpr PCB_LAYER_ID PCBNEW_LAYER_ID_START
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
@ LAYER_PAD_COPPER_START
Virtual layers for pad copper on a given copper layer.
@ LAYER_FOOTPRINTS_FR
Show footprints on front.
@ LAYER_DRC_SHAPE1
Custom shape for DRC marker.
@ LAYER_NON_PLATEDHOLES
Draw usual through hole vias.
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
@ LAYER_FP_REFERENCES
Show footprints references (when texts are visible).
@ LAYER_DRC_EXCLUSION
Layer for DRC markers which have been individually excluded.
@ LAYER_ZONES
Control for copper zone opacity/visibility (color ignored).
@ LAYER_SHAPES
Copper graphic shape opacity/visibility (color ignored).
@ LAYER_PADS
Meta control for all pads opacity/visibility (color ignored).
@ LAYER_DRC_WARNING
Layer for DRC markers with #SEVERITY_WARNING.
@ LAYER_PAD_PLATEDHOLES
to draw pad holes (plated)
@ LAYER_VIA_COPPER_START
Virtual layers for via copper on a given copper layer.
@ LAYER_DRC_SHAPE2
Custom shape for DRC marker.
@ LAYER_ZONE_START
Virtual layers for stacking zones and tracks on a given copper layer.
@ LAYER_FOOTPRINTS_BK
Show footprints on back.
@ LAYER_ANCHOR
Anchor of items having an anchor point (texts, footprints).
@ LAYER_VIA_HOLES
Draw via holes (pad holes do not use this layer).
@ LAYER_FP_VALUES
Show footprints values (when texts are visible).
@ LAYER_VIA_THROUGH
Draw blind/buried vias.
@ LAYER_DRC_ERROR
Layer for DRC markers with #SEVERITY_ERROR.
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
@ LAYER_VIA_BBLIND
Draw micro vias.
PCB_LAYER_ID
A quick note on layer IDs:
PAD_DRILL_SHAPE
The set of pad drill shapes, used with PAD::{Set,Get}DrillShape()
PGM_BASE & Pgm()
The global program "get" accessor.
DRILL_MARKS
Plots and prints can show holes in pads and vias 3 options are available:
void Load(APP_SETTINGS_BASE *aConfig) override
LSET m_LayerSet
Layers to print.
void Save(APP_SETTINGS_BASE *aConfig) override
bool m_Mirror
Print mirrored.
constexpr int mmToIU(double mm) const
enum PCBNEW_PRINTOUT_SETTINGS::PAGINATION_T m_Pagination
bool m_PrintEdgeCutsOnAllPages
Print board outline on each page.
enum DRILL_MARKS m_DrillMarks
bool m_AsItemCheckboxes
Honor checkboxes in the Items tab of the Layers Manager.
void Load(APP_SETTINGS_BASE *aConfig) override
void Save(APP_SETTINGS_BASE *aConfig) override
PCBNEW_PRINTOUT_SETTINGS(const PAGE_INFO &aPageInfo)
int all_layers_on_one_page
bool edgecut_on_all_layers
bool m_blackWhite
Print in B&W or Color.