51 if(
auto cfg = dynamic_cast<PCBNEW_SETTINGS*>( aConfig ) )
53 m_drillMarks = static_cast<DRILL_MARK_SHAPE_T>( cfg->m_Plot.pads_drill_mode );
54 m_pagination = static_cast<PAGINATION_T>( cfg->m_Plot.all_layers_on_one_page );
64 if(
auto cfg = dynamic_cast<PCBNEW_SETTINGS*>( aConfig ) )
74 const KIGFX::VIEW* aView,
const wxString& aTitle ) :
75 BOARD_PRINTOUT( aParams, aView, aTitle ), m_pcbnewSettings( aParams )
86 int pageCount = lset.count();
98 if(
unsigned( aPage - 1 ) < seq.size() )
108 layerName =
_(
"Multiple Layers" );
116 DrawPage( layerName, aPage, pageCount );
182 const int alwaysEnabled[] =
188 for(
int layer : alwaysEnabled )
194 if( aLayerSet.test(
F_Cu ) )
199 if( aLayerSet.test(
B_Cu ) )
214 const int alwaysEnabled[] =
221 for(
int layer : alwaysEnabled )
286 return std::make_unique<KIGFX::PCB_PRINT_PAINTER>( aGal );
292 m_drillMarkReal( false ),
309 VECTOR2D( m_drillMarkSize, m_drillMarkSize );
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Virtual layers for stacking zones and tracks on a given copper layer.
bool m_noEdgeLayer
Disable board outline on each page.
to draw blind/buried vias
PCBNEW_PRINTOUT_SETTINGS(const PAGE_INFO &aPageInfo)
show a marker on pads with no nets
void Save(APP_SETTINGS_BASE *aConfig) override
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.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
to draw pad holes (plated)
multilayer pads, usually with holes
to draw via holes (pad holes do not use this layer)
handle color for not plated holes (holes, not pads)
anchor of items having an anchor point (texts, footprints)
int getDrillShape(const PAD *aPad) const override
Return drill shape of a pad.
Special flavor of PCB_PAINTER that contains modifications to handle printing options.
Control for copper zone opacity/visibility (color ignored)
void EnableZoneOutlines(bool aEnabled)
Turn on/off drawing outline and hatched lines for zones.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
GAL_LAYER_ID
GAL layers are "virtual" layers, i.e.
void Load(APP_SETTINGS_BASE *aConfig) override
show footprints values (when texts are visibles)
LSET m_LayerSet
Layers to print.
PCBNEW_PRINTOUT(BOARD *aBoard, const PCBNEW_PRINTOUT_SETTINGS &aParams, const KIGFX::VIEW *aView, const wxString &aTitle)
virtual void DrawPage(const wxString &aLayerName=wxEmptyString, int aPageNum=1, int aPageCount=1)
Print a page (or a set of pages).
PCB_RENDER_SETTINGS m_pcbSettings
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
Contains methods for drawing PCB-specific items.
std::unique_ptr< KIGFX::PAINTER > getPainter(KIGFX::GAL *aGal) override
Source VIEW object (note that actual printing only refers to this object)
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
BOARD_PRINTOUT_SETTINGS m_settings
virtual VECTOR2D getDrillSize(const PAD *aPad) const
Return drill size for a pad (internal units).
Board plot function definition file.
void setupPainter(KIGFX::PAINTER &aPainter) override
Configures GAL object for a printout.
PCB_LAYER_ID
A quick note on layer IDs:
Contains all the knowledge about how to draw graphical object onto any particular output device.
void Load(APP_SETTINGS_BASE *aConfig) override
void setupViewLayers(KIGFX::VIEW &aView, const LSET &aLayerSet) override
Configures PAINTER object for a printout.
LSET is a set of PCB_LAYER_IDs.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
VECTOR2< double > VECTOR2D
virtual PCB_RENDER_SETTINGS * GetSettings() override
Return a pointer to current settings that are going to be used when drawing items.
virtual void setupPainter(KIGFX::PAINTER &aPainter)
Configures GAL object for a printout.
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
int milsToIU(double aMils) const override
< Convert mils to internal units
Describe the page size and margins of a paper page on which to eventually print or plot.
Meta control for all pads opacity/visibility (color ignored)
to draw usual through hole vias
virtual void setupGal(KIGFX::GAL *aGal)
Returns bounding box of the printed objects (excluding drawing-sheet frame)
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Change the color used to draw a layer.
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
bool m_asItemCheckboxes
Honor checkboxes in the Items tab of the Layers Manager.
void Save(APP_SETTINGS_BASE *aConfig) override
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
void SetDrawIndividualViaLayers(bool aFlag)
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
virtual void setupViewLayers(KIGFX::VIEW &aView, const LSET &aLayerSet)
Configures PAINTER object for a printout.
layer for drc markers which have been individually excluded
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Test whether a given element category is visible.
layer for drc markers with SEVERITY_WARNING
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
An object derived from wxPrintout to handle the necessary information to control a printer when print...
Meta control for all vias opacity/visibility.
PCB_LAYER_ID ExtractLayer() const
Find the first set PCB_LAYER_ID.
PCBNEW_PRINTOUT_SETTINGS m_pcbnewSettings
Information pertinent to a Pcbnew printed circuit board.
Handle the component boundary box.
VECTOR2D getDrillSize(const PAD *aPad) const override
Return drill size for a pad (internal units).
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
PCB_PRINT_PAINTER(GAL *aGal)
enum PCBNEW_PRINTOUT_SETTINGS::PAGINATION_T m_pagination
EDA_RECT ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
bool IsCopperLayer(LAYER_NUM aLayerId)
Tests whether a layer is a copper layer.
EDA_RECT getBoundingBox() override
Returns a PAINTER instance used to draw the items.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
enum PCBNEW_PRINTOUT_SETTINGS::DRILL_MARK_SHAPE_T m_drillMarks
drawingsheet frame and titleblock
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void setupGal(KIGFX::GAL *aGal) override
Returns bounding box of the printed objects (excluding drawing-sheet frame)
virtual int getDrillShape(const PAD *aPad) const
Return drill shape of a pad.
static constexpr int Millimeter2iu(double mm)
bool OnPrintPage(int aPage) override
bool m_Mirror
Print mirrored.
show footprints references (when texts are visibles)
layer for drc markers with SEVERITY_ERROR
void SetDrillMarks(bool aRealSize, unsigned int aSize=0)
Set drill marks visibility and options.
Abstract interface for drawing on a 2D-surface.
A color representation with 4 components: red, green, blue, alpha.