KiCad PCB EDA Suite
BRDITEMS_PLOTTER Class Reference

#include <pcbplot.h>

Inheritance diagram for BRDITEMS_PLOTTER:
PCB_PLOT_PARAMS

Public Member Functions

 BRDITEMS_PLOTTER (PLOTTER *aPlotter, BOARD *aBoard, const PCB_PLOT_PARAMS &aPlotOpts)
 
int getFineWidthAdj () const
 
void SetLayerSet (LSET aLayerMask)
 
void PlotFootprintGraphicItems (const FOOTPRINT *aFootprint)
 
void PlotFootprintShape (const FP_SHAPE *aShape)
 
void PlotFootprintTextItem (const FP_TEXT *aText, const COLOR4D &aColor)
 
void PlotFootprintTextItems (const FOOTPRINT *aFootprint)
 
void PlotDimension (const PCB_DIMENSION_BASE *aDim)
 
void PlotPcbTarget (const PCB_TARGET *aMire)
 
void PlotFilledAreas (const ZONE *aZone, PCB_LAYER_ID aLayer, const SHAPE_POLY_SET &aPolysList)
 
void PlotPcbText (const EDA_TEXT *aText, PCB_LAYER_ID aLayer, bool aIsKnockout)
 
void PlotPcbShape (const PCB_SHAPE *aShape)
 
void PlotPad (const PAD *aPad, const COLOR4D &aColor, OUTLINE_MODE aPlotMode)
 Plot a pad. More...
 
void PlotBoardGraphicItems ()
 Plot items like text and graphics but not tracks and footprints. More...
 
void PlotPcbGraphicItem (const BOARD_ITEM *item)
 
void PlotDrillMarks ()
 Draw a drill mark for pads and vias. More...
 
COLOR4D getColor (int aLayer) const
 White color is special because it cannot be seen on a white paper in B&W mode. More...
 
void SetSkipPlotNPTH_Pads (bool aSkip)
 
bool GetSkipPlotNPTH_Pads () const
 
void Format (OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControl=0) const
 
void Parse (PCB_PLOT_PARAMS_PARSER *aParser)
 
bool IsSameAs (const PCB_PLOT_PARAMS &aPcbPlotParams) const
 Compare current settings to aPcbPlotParams, including not saved parameters in brd file. More...
 
void SetColorSettings (COLOR_SETTINGS *aSettings)
 
COLOR_SETTINGSColorSettings () const
 
void SetTextMode (PLOT_TEXT_MODE aVal)
 
PLOT_TEXT_MODE GetTextMode () const
 
void SetPlotMode (OUTLINE_MODE aPlotMode)
 
OUTLINE_MODE GetPlotMode () const
 
void SetDXFPlotPolygonMode (bool aFlag)
 
bool GetDXFPlotPolygonMode () const
 
void SetDXFPlotUnits (DXF_UNITS aUnit)
 
DXF_UNITS GetDXFPlotUnits () const
 
void SetDrillMarksType (DRILL_MARKS aVal)
 
DRILL_MARKS GetDrillMarksType () const
 
void SetScale (double aVal)
 
double GetScale () const
 
void SetFineScaleAdjustX (double aVal)
 
double GetFineScaleAdjustX () const
 
void SetFineScaleAdjustY (double aVal)
 
double GetFineScaleAdjustY () const
 
void SetWidthAdjust (int aVal)
 
int GetWidthAdjust () const
 
void SetAutoScale (bool aFlag)
 
bool GetAutoScale () const
 
void SetMirror (bool aFlag)
 
bool GetMirror () const
 
void SetSketchPadsOnFabLayers (bool aFlag)
 
bool GetSketchPadsOnFabLayers () const
 
void SetSketchPadLineWidth (int aWidth)
 
int GetSketchPadLineWidth () const
 
void SetPlotInvisibleText (bool aFlag)
 
bool GetPlotInvisibleText () const
 
void SetPlotValue (bool aFlag)
 
bool GetPlotValue () const
 
void SetPlotReference (bool aFlag)
 
bool GetPlotReference () const
 
void SetNegative (bool aFlag)
 
bool GetNegative () const
 
void SetPlotViaOnMaskLayer (bool aFlag)
 
bool GetPlotViaOnMaskLayer () const
 
void SetPlotFrameRef (bool aFlag)
 
bool GetPlotFrameRef () const
 
void SetFormat (PLOT_FORMAT aFormat)
 
PLOT_FORMAT GetFormat () const
 
void SetOutputDirectory (const wxString &aDir)
 
wxString GetOutputDirectory () const
 
void SetDisableGerberMacros (bool aDisable)
 
bool GetDisableGerberMacros () const
 
void SetUseGerberX2format (bool aUse)
 
bool GetUseGerberX2format () const
 
void SetIncludeGerberNetlistInfo (bool aUse)
 
bool GetIncludeGerberNetlistInfo () const
 
void SetCreateGerberJobFile (bool aCreate)
 
bool GetCreateGerberJobFile () const
 
void SetUseGerberProtelExtensions (bool aUse)
 
bool GetUseGerberProtelExtensions () const
 
void SetGerberPrecision (int aPrecision)
 
int GetGerberPrecision () const
 
void SetSvgPrecision (unsigned aPrecision)
 
unsigned GetSvgPrecision () const
 
void SetBlackAndWhite (bool blackAndWhite)
 
unsigned GetBlackAndWhite () const
 
void SetSubtractMaskFromSilk (bool aSubtract)
 
bool GetSubtractMaskFromSilk () const
 
void SetLayerSelection (LSET aSelection)
 
LSET GetLayerSelection () const
 
void SetPlotOnAllLayersSelection (LSET aSelection)
 
LSET GetPlotOnAllLayersSelection () const
 
void SetUseAuxOrigin (bool aAux)
 
bool GetUseAuxOrigin () const
 
void SetScaleSelection (int aSelection)
 
int GetScaleSelection () const
 
void SetA4Output (int aForce)
 
bool GetA4Output () const
 
double GetHPGLPenDiameter () const
 
bool SetHPGLPenDiameter (double aValue)
 
int GetHPGLPenSpeed () const
 
bool SetHPGLPenSpeed (int aValue)
 
void SetHPGLPenNum (int aVal)
 
int GetHPGLPenNum () const
 
void SetDashedLineDashRatio (double aVal)
 
double GetDashedLineDashRatio () const
 
void SetDashedLineGapRatio (double aVal)
 
double GetDashedLineGapRatio () const
 

Static Public Member Functions

static int GetGerberDefaultPrecision ()
 Default precision of coordinates in Gerber files. More...
 

Private Member Functions

void plotOneDrillMark (PAD_DRILL_SHAPE_T aDrillShape, const VECTOR2I &aDrillPos, const VECTOR2I &aDrillSize, const VECTOR2I &aPadSize, const EDA_ANGLE &aOrientation, int aSmallDrill)
 Helper function to plot a single drill mark. More...
 

Private Attributes

PLOTTERm_plotter
 
BOARDm_board
 
LSET m_layerMask
 
bool m_skipNPTH_Pads
 
OUTLINE_MODE m_plotMode
 FILLED or SKETCH selects how to plot filled objects. More...
 
bool m_DXFplotPolygonMode
 DXF format: Plot items in outline (polygon) mode. More...
 
DXF_UNITS m_DXFplotUnits
 DXF format: Units to use when plotting the DXF. More...
 
PLOT_FORMAT m_format
 Plot format type (chooses the driver to be used) More...
 
DRILL_MARKS m_drillMarks
 Holes can be not plotted, have a small mark or plotted in actual size. More...
 
PLOT_TEXT_MODE m_textMode
 Choose how represent text with PS, PDF and DXF drivers. More...
 
bool m_autoScale
 When true set the scale to fit the board in the page. More...
 
double m_scale
 Global scale factor, 1.0 plots a board with its actual size. More...
 
bool m_mirror
 Mirror the plot around the X axis. More...
 
bool m_negative
 Plot in negative color (supported only by some drivers) More...
 
bool m_plotViaOnMaskLayer
 True if vias are drawn on Mask layer (ie untented, exposed by mask) More...
 
bool m_plotFrameRef
 True to plot/print frame references. More...
 
LSET m_layerSelection
 Set of layers to plot. More...
 
LSET m_plotOnAllLayersSelection
 Set of layers that get plotted on each of the layers to plot. More...
 
bool m_useGerberProtelExtensions
 When plotting gerber files, use a conventional set of Protel extensions instead of .gbr, that is now the official gerber file extension this is a deprecated feature. More...
 
bool m_useGerberX2format
 Include attributes from the Gerber X2 format (chapter 5 in revision J2) More...
 
bool m_gerberDisableApertMacros
 Disable aperture macros in Gerber format (only for broken Gerber readers) Ideally, should be never selected. More...
 
bool m_includeGerberNetlistInfo
 Include netlist info (only in Gerber X2 format) (chapter ? in revision ?) More...
 
bool m_createGerberJobFile
 generate the auxiliary "job file" in gerber format More...
 
int m_gerberPrecision
 precision of coordinates in Gerber files: accepted 5 or 6 when units are in mm (6 or 7 in inches, but Pcbnew uses mm). More...
 
unsigned m_svgPrecision
 precision of coordinates in SVG files: accepted 3 - 6 6 is the internal resolution of Pcbnew More...
 
bool m_blackAndWhite
 Plot in black and white only. More...
 
bool m_useAuxOrigin
 Plot gerbers using auxiliary (drill) origin instead of absolute coordinates. More...
 
bool m_subtractMaskFromSilk
 On gerbers 'scrape' away the solder mask from silkscreen (trim silks) More...
 
bool m_A4Output
 Autoscale the plot to fit an A4 (landscape?) sheet. More...
 
int m_scaleSelection
 Scale ratio index (UI only) More...
 
wxString m_outputDirectory
 Output directory for plot files (usually relative to the board file) More...
 
bool m_plotReference
 Enable plotting of part references. More...
 
bool m_plotValue
 Enable plotting of part values. More...
 
bool m_plotInvisibleText
 Force plotting of fields marked invisible. More...
 
bool m_sketchPadsOnFabLayers
 Plots pads outlines on fab layers. More...
 
int m_sketchPadLineWidth
 
double m_fineScaleAdjustX
 fine scale adjust X axis More...
 
double m_fineScaleAdjustY
 fine scale adjust Y axis More...
 
int m_widthAdjust
 This width factor is intended to compensate PS printers/ plotters that do not strictly obey line width settings. More...
 
int m_HPGLPenNum
 HPGL only: pen number selection(1 to 9) More...
 
int m_HPGLPenSpeed
 HPGL only: pen speed, always in cm/s (1 to 99 cm/s) More...
 
double m_HPGLPenDiam
 HPGL only: pen diameter in MILS, useful to fill areas However, it is in mm in hpgl files. More...
 
double m_dashedLineDashRatio
 
double m_dashedLineGapRatio
 
COLOR_SETTINGSm_colors
 Pointer to active color settings to be used for plotting. More...
 
std::shared_ptr< COLOR_SETTINGSm_default_colors
 Dummy colors object that can be created if there is no Pgm context. More...
 

Detailed Description

Definition at line 56 of file pcbplot.h.

Constructor & Destructor Documentation

◆ BRDITEMS_PLOTTER()

BRDITEMS_PLOTTER::BRDITEMS_PLOTTER ( PLOTTER aPlotter,
BOARD aBoard,
const PCB_PLOT_PARAMS aPlotOpts 
)
inline

Definition at line 59 of file pcbplot.h.

60 : PCB_PLOT_PARAMS( aPlotOpts )
61 {
62 m_plotter = aPlotter;
63 m_board = aBoard;
64 }
BOARD * m_board
Definition: pcbplot.h:141
PLOTTER * m_plotter
Definition: pcbplot.h:140

References m_board, and m_plotter.

Member Function Documentation

◆ ColorSettings()

COLOR_SETTINGS * PCB_PLOT_PARAMS::ColorSettings ( ) const
inlineinherited

Definition at line 59 of file pcb_plot_params.h.

59{ return m_colors; }
COLOR_SETTINGS * m_colors
Pointer to active color settings to be used for plotting.

References PCB_PLOT_PARAMS::m_colors.

Referenced by getColor(), PlotDimension(), PlotStandardLayer(), and StartPlotBoard().

◆ Format()

void PCB_PLOT_PARAMS::Format ( OUTPUTFORMATTER aFormatter,
int  aNestLevel,
int  aControl = 0 
) const
inherited

Definition at line 167 of file pcb_plot_params.cpp.

169{
170 auto printBool =
171 []( bool aBool ) -> const char*
172 {
173 return aBool ? "true" : "false";
174 };
175
176 aFormatter->Print( aNestLevel, "(pcbplotparams\n" );
177
178 aFormatter->Print( aNestLevel+1, "(layerselection 0x%s)\n",
179 m_layerSelection.FmtHex().c_str() );
180
181 aFormatter->Print( aNestLevel+1, "(plot_on_all_layers_selection 0x%s)\n",
183
184 aFormatter->Print( aNestLevel+1, "(disableapertmacros %s)\n",
185 printBool( m_gerberDisableApertMacros ) );
186
187 aFormatter->Print( aNestLevel+1, "(usegerberextensions %s)\n",
188 printBool( m_useGerberProtelExtensions) );
189
190 aFormatter->Print( aNestLevel+1, "(usegerberattributes %s)\n",
191 printBool( GetUseGerberX2format()) );
192
193 aFormatter->Print( aNestLevel+1, "(usegerberadvancedattributes %s)\n",
194 printBool( GetIncludeGerberNetlistInfo()) );
195
196 aFormatter->Print( aNestLevel+1, "(creategerberjobfile %s)\n",
197 printBool( GetCreateGerberJobFile()) );
198
199 // save this option only if it is not the default value,
200 // to avoid incompatibility with older Pcbnew version
202 aFormatter->Print( aNestLevel+1, "(gerberprecision %d)\n", m_gerberPrecision );
203
204 aFormatter->Print( aNestLevel+1, "(dashed_line_dash_ratio %f)\n", GetDashedLineDashRatio() );
205 aFormatter->Print( aNestLevel+1, "(dashed_line_gap_ratio %f)\n", GetDashedLineGapRatio() );
206
207 // SVG options
208 aFormatter->Print( aNestLevel+1, "(svgprecision %d)\n", m_svgPrecision );
209
210 aFormatter->Print( aNestLevel+1, "(plotframeref %s)\n", printBool( m_plotFrameRef ) );
211 aFormatter->Print( aNestLevel+1, "(viasonmask %s)\n", printBool( m_plotViaOnMaskLayer ) );
212 aFormatter->Print( aNestLevel+1, "(mode %d)\n", GetPlotMode() == SKETCH ? 2 : 1 );
213 aFormatter->Print( aNestLevel+1, "(useauxorigin %s)\n", printBool( m_useAuxOrigin ) );
214
215 // HPGL options
216 aFormatter->Print( aNestLevel+1, "(hpglpennumber %d)\n", m_HPGLPenNum );
217 aFormatter->Print( aNestLevel+1, "(hpglpenspeed %d)\n", m_HPGLPenSpeed );
218 aFormatter->Print( aNestLevel+1, "(hpglpendiameter %f)\n", m_HPGLPenDiam );
219
220 // DXF options
221 aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_dxfpolygonmode ),
222 printBool( m_DXFplotPolygonMode ) );
223 aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_dxfimperialunits ),
224 printBool( m_DXFplotUnits == DXF_UNITS::INCHES ) );
225 aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_dxfusepcbnewfont ),
226 printBool( m_textMode != PLOT_TEXT_MODE::NATIVE ) );
227
228 aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psnegative ),
229 printBool( m_negative ) );
230 aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psa4output ),
231 printBool( m_A4Output ) );
232 aFormatter->Print( aNestLevel+1, "(plotreference %s)\n", printBool( m_plotReference ) );
233 aFormatter->Print( aNestLevel+1, "(plotvalue %s)\n", printBool( m_plotValue ) );
234 aFormatter->Print( aNestLevel+1, "(plotinvisibletext %s)\n", printBool( m_plotInvisibleText ) );
235 aFormatter->Print( aNestLevel+1, "(sketchpadsonfab %s)\n",
236 printBool( m_sketchPadsOnFabLayers ) );
237 aFormatter->Print( aNestLevel+1, "(subtractmaskfromsilk %s)\n",
238 printBool( m_subtractMaskFromSilk ) );
239 aFormatter->Print( aNestLevel+1, "(outputformat %d)\n", static_cast<int>( m_format ) );
240 aFormatter->Print( aNestLevel+1, "(mirror %s)\n", printBool( m_mirror ) );
241 aFormatter->Print( aNestLevel+1, "(drillshape %d)\n", (int)m_drillMarks );
242 aFormatter->Print( aNestLevel+1, "(scaleselection %d)\n", m_scaleSelection );
243 aFormatter->Print( aNestLevel+1, "(outputdirectory \"%s\")",
244 (const char*) m_outputDirectory.utf8_str() );
245 aFormatter->Print( 0, "\n" );
246 aFormatter->Print( aNestLevel, ")\n" );
247}
std::string FmtHex() const
Return a hex string showing contents of this LSEQ.
Definition: lset.cpp:321
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:433
bool m_sketchPadsOnFabLayers
Plots pads outlines on fab layers.
int m_HPGLPenNum
HPGL only: pen number selection(1 to 9)
DXF_UNITS m_DXFplotUnits
DXF format: Units to use when plotting the DXF.
int m_gerberPrecision
precision of coordinates in Gerber files: accepted 5 or 6 when units are in mm (6 or 7 in inches,...
bool m_A4Output
Autoscale the plot to fit an A4 (landscape?) sheet.
int m_scaleSelection
Scale ratio index (UI only)
PLOT_TEXT_MODE m_textMode
Choose how represent text with PS, PDF and DXF drivers.
bool m_plotValue
Enable plotting of part values.
wxString m_outputDirectory
Output directory for plot files (usually relative to the board file)
bool m_useGerberProtelExtensions
When plotting gerber files, use a conventional set of Protel extensions instead of ....
int m_HPGLPenSpeed
HPGL only: pen speed, always in cm/s (1 to 99 cm/s)
bool GetCreateGerberJobFile() const
bool m_useAuxOrigin
Plot gerbers using auxiliary (drill) origin instead of absolute coordinates.
LSET m_plotOnAllLayersSelection
Set of layers that get plotted on each of the layers to plot.
bool m_plotFrameRef
True to plot/print frame references.
bool m_plotInvisibleText
Force plotting of fields marked invisible.
PLOT_FORMAT m_format
Plot format type (chooses the driver to be used)
bool m_plotReference
Enable plotting of part references.
double m_HPGLPenDiam
HPGL only: pen diameter in MILS, useful to fill areas However, it is in mm in hpgl files.
bool m_DXFplotPolygonMode
DXF format: Plot items in outline (polygon) mode.
bool m_gerberDisableApertMacros
Disable aperture macros in Gerber format (only for broken Gerber readers) Ideally,...
bool m_subtractMaskFromSilk
On gerbers 'scrape' away the solder mask from silkscreen (trim silks)
bool GetUseGerberX2format() const
bool m_mirror
Mirror the plot around the X axis.
unsigned m_svgPrecision
precision of coordinates in SVG files: accepted 3 - 6 6 is the internal resolution of Pcbnew
bool GetIncludeGerberNetlistInfo() const
double GetDashedLineGapRatio() const
double GetDashedLineDashRatio() const
DRILL_MARKS m_drillMarks
Holes can be not plotted, have a small mark or plotted in actual size.
bool m_negative
Plot in negative color (supported only by some drivers)
bool m_plotViaOnMaskLayer
True if vias are drawn on Mask layer (ie untented, exposed by mask)
OUTLINE_MODE GetPlotMode() const
LSET m_layerSelection
Set of layers to plot.
@ SKETCH
Definition: outline_mode.h:26
static const char * getTokenName(T aTok)
static const int gbrDefaultPrecision

References LSET::FmtHex(), gbrDefaultPrecision, PCB_PLOT_PARAMS::GetCreateGerberJobFile(), PCB_PLOT_PARAMS::GetDashedLineDashRatio(), PCB_PLOT_PARAMS::GetDashedLineGapRatio(), PCB_PLOT_PARAMS::GetIncludeGerberNetlistInfo(), PCB_PLOT_PARAMS::GetPlotMode(), getTokenName(), PCB_PLOT_PARAMS::GetUseGerberX2format(), INCHES, PCB_PLOT_PARAMS::m_A4Output, PCB_PLOT_PARAMS::m_drillMarks, PCB_PLOT_PARAMS::m_DXFplotPolygonMode, PCB_PLOT_PARAMS::m_DXFplotUnits, PCB_PLOT_PARAMS::m_format, PCB_PLOT_PARAMS::m_gerberDisableApertMacros, PCB_PLOT_PARAMS::m_gerberPrecision, PCB_PLOT_PARAMS::m_HPGLPenDiam, PCB_PLOT_PARAMS::m_HPGLPenNum, PCB_PLOT_PARAMS::m_HPGLPenSpeed, PCB_PLOT_PARAMS::m_layerSelection, PCB_PLOT_PARAMS::m_mirror, PCB_PLOT_PARAMS::m_negative, PCB_PLOT_PARAMS::m_outputDirectory, PCB_PLOT_PARAMS::m_plotFrameRef, PCB_PLOT_PARAMS::m_plotInvisibleText, PCB_PLOT_PARAMS::m_plotOnAllLayersSelection, PCB_PLOT_PARAMS::m_plotReference, PCB_PLOT_PARAMS::m_plotValue, PCB_PLOT_PARAMS::m_plotViaOnMaskLayer, PCB_PLOT_PARAMS::m_scaleSelection, PCB_PLOT_PARAMS::m_sketchPadsOnFabLayers, PCB_PLOT_PARAMS::m_subtractMaskFromSilk, PCB_PLOT_PARAMS::m_svgPrecision, PCB_PLOT_PARAMS::m_textMode, PCB_PLOT_PARAMS::m_useAuxOrigin, PCB_PLOT_PARAMS::m_useGerberProtelExtensions, NATIVE, OUTPUTFORMATTER::Print(), and SKETCH.

Referenced by PCB_PLUGIN::formatSetup().

◆ GetA4Output()

bool PCB_PLOT_PARAMS::GetA4Output ( ) const
inlineinherited

Definition at line 178 of file pcb_plot_params.h.

178{ return m_A4Output; }

References PCB_PLOT_PARAMS::m_A4Output.

Referenced by DIALOG_PLOT::init_Dialog(), and initializePlotter().

◆ GetAutoScale()

bool PCB_PLOT_PARAMS::GetAutoScale ( ) const
inlineinherited

Definition at line 94 of file pcb_plot_params.h.

94{ return m_autoScale; }
bool m_autoScale
When true set the scale to fit the board in the page.

References PCB_PLOT_PARAMS::m_autoScale.

Referenced by initializePlotter().

◆ GetBlackAndWhite()

unsigned PCB_PLOT_PARAMS::GetBlackAndWhite ( ) const
inlineinherited

Definition at line 148 of file pcb_plot_params.h.

148{ return m_blackAndWhite; }
bool m_blackAndWhite
Plot in black and white only.

References PCB_PLOT_PARAMS::m_blackAndWhite.

Referenced by DIALOG_PLOT::init_Dialog(), and initializePlotter().

◆ getColor()

COLOR4D BRDITEMS_PLOTTER::getColor ( int  aLayer) const

White color is special because it cannot be seen on a white paper in B&W mode.

It is plotted as white but other colors are plotted in BLACK so the returned color is LIGHTGRAY when the layer color is WHITE.

Parameters
aLayeris the layer id.
Returns
the layer color.

Definition at line 70 of file plot_brditems_plotter.cpp.

71{
72 COLOR4D color = ColorSettings()->GetColor( aLayer );
73
74 // A hack to avoid plotting a white item in white color, expecting the paper
75 // is also white: use a non white color:
76 if( color == COLOR4D::WHITE )
78
79 return color;
80}
int color
Definition: DXF_plotter.cpp:57
COLOR4D GetColor(int aLayer) const
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
COLOR_SETTINGS * ColorSettings() const
@ WHITE
Definition: color4d.h:48
@ LIGHTGRAY
Definition: color4d.h:47

References color, PCB_PLOT_PARAMS::ColorSettings(), COLOR_SETTINGS::GetColor(), LIGHTGRAY, and WHITE.

Referenced by PlotFilledAreas(), PlotFootprintShape(), PlotFootprintTextItems(), PlotPcbShape(), PlotPcbTarget(), PlotPcbText(), and PlotStandardLayer().

◆ GetCreateGerberJobFile()

bool PCB_PLOT_PARAMS::GetCreateGerberJobFile ( ) const
inlineinherited

Definition at line 136 of file pcb_plot_params.h.

136{ return m_createGerberJobFile; }
bool m_createGerberJobFile
generate the auxiliary "job file" in gerber format

References PCB_PLOT_PARAMS::m_createGerberJobFile.

Referenced by PCB_PLOT_PARAMS::Format(), DIALOG_PLOT::init_Dialog(), and DIALOG_PLOT::Plot().

◆ GetDashedLineDashRatio()

double PCB_PLOT_PARAMS::GetDashedLineDashRatio ( ) const
inlineinherited

◆ GetDashedLineGapRatio()

double PCB_PLOT_PARAMS::GetDashedLineGapRatio ( ) const
inlineinherited

◆ GetDisableGerberMacros()

bool PCB_PLOT_PARAMS::GetDisableGerberMacros ( ) const
inlineinherited

◆ GetDrillMarksType()

DRILL_MARKS PCB_PLOT_PARAMS::GetDrillMarksType ( ) const
inlineinherited

◆ GetDXFPlotPolygonMode()

bool PCB_PLOT_PARAMS::GetDXFPlotPolygonMode ( ) const
inlineinherited

Definition at line 75 of file pcb_plot_params.h.

75{ return m_DXFplotPolygonMode; }

References PCB_PLOT_PARAMS::m_DXFplotPolygonMode.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotOneBoardLayer().

◆ GetDXFPlotUnits()

DXF_UNITS PCB_PLOT_PARAMS::GetDXFPlotUnits ( ) const
inlineinherited

Definition at line 78 of file pcb_plot_params.h.

78{ return m_DXFplotUnits; }

References PCB_PLOT_PARAMS::m_DXFplotUnits.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetFineScaleAdjustX()

double PCB_PLOT_PARAMS::GetFineScaleAdjustX ( ) const
inlineinherited

Definition at line 87 of file pcb_plot_params.h.

87{ return m_fineScaleAdjustX; }
double m_fineScaleAdjustX
fine scale adjust X axis

References PCB_PLOT_PARAMS::m_fineScaleAdjustX.

Referenced by StartPlotBoard().

◆ GetFineScaleAdjustY()

double PCB_PLOT_PARAMS::GetFineScaleAdjustY ( ) const
inlineinherited

Definition at line 89 of file pcb_plot_params.h.

89{ return m_fineScaleAdjustY; }
double m_fineScaleAdjustY
fine scale adjust Y axis

References PCB_PLOT_PARAMS::m_fineScaleAdjustY.

Referenced by StartPlotBoard().

◆ getFineWidthAdj()

int BRDITEMS_PLOTTER::getFineWidthAdj ( ) const
inline
Returns
a 'width adjustment' for the postscript engine (useful for controlling toner bleeding during direct transfer) added to track width and via/pads size

Definition at line 71 of file pcbplot.h.

72 {
74 return GetWidthAdjust();
75 else
76 return 0;
77 }
PLOT_FORMAT GetFormat() const
int GetWidthAdjust() const

References PCB_PLOT_PARAMS::GetFormat(), PCB_PLOT_PARAMS::GetWidthAdjust(), and POST.

Referenced by plotOneDrillMark(), and PlotStandardLayer().

◆ GetFormat()

PLOT_FORMAT PCB_PLOT_PARAMS::GetFormat ( ) const
inlineinherited

◆ GetGerberDefaultPrecision()

static int PCB_PLOT_PARAMS::GetGerberDefaultPrecision ( )
inlinestaticinherited

Default precision of coordinates in Gerber files.

When units are in mm (7 in inches, but Pcbnew uses mm). 6 is the internal resolution of Pcbnew, so the default is 6.

Definition at line 156 of file pcb_plot_params.h.

156{ return 6; }

◆ GetGerberPrecision()

int PCB_PLOT_PARAMS::GetGerberPrecision ( ) const
inlineinherited

◆ GetHPGLPenDiameter()

double PCB_PLOT_PARAMS::GetHPGLPenDiameter ( ) const
inlineinherited

◆ GetHPGLPenNum()

int PCB_PLOT_PARAMS::GetHPGLPenNum ( ) const
inlineinherited

Definition at line 190 of file pcb_plot_params.h.

190{ return m_HPGLPenNum; }

References PCB_PLOT_PARAMS::m_HPGLPenNum.

Referenced by ConfigureHPGLPenSizes().

◆ GetHPGLPenSpeed()

int PCB_PLOT_PARAMS::GetHPGLPenSpeed ( ) const
inlineinherited

Definition at line 186 of file pcb_plot_params.h.

186{ return m_HPGLPenSpeed; }

References PCB_PLOT_PARAMS::m_HPGLPenSpeed.

Referenced by ConfigureHPGLPenSizes().

◆ GetIncludeGerberNetlistInfo()

bool PCB_PLOT_PARAMS::GetIncludeGerberNetlistInfo ( ) const
inlineinherited

Definition at line 133 of file pcb_plot_params.h.

bool m_includeGerberNetlistInfo
Include netlist info (only in Gerber X2 format) (chapter ? in revision ?)

References PCB_PLOT_PARAMS::m_includeGerberNetlistInfo.

Referenced by PCB_PLOT_PARAMS::Format(), DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetLayerSelection()

LSET PCB_PLOT_PARAMS::GetLayerSelection ( ) const
inlineinherited

◆ GetMirror()

bool PCB_PLOT_PARAMS::GetMirror ( ) const
inlineinherited

Definition at line 97 of file pcb_plot_params.h.

97{ return m_mirror; }

References PCB_PLOT_PARAMS::m_mirror.

Referenced by DIALOG_PLOT::init_Dialog(), initializePlotter(), and StartPlotBoard().

◆ GetNegative()

bool PCB_PLOT_PARAMS::GetNegative ( ) const
inlineinherited

Definition at line 112 of file pcb_plot_params.h.

112{ return m_negative; }

References PCB_PLOT_PARAMS::m_negative.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetOutputDirectory()

◆ GetPlotFrameRef()

bool PCB_PLOT_PARAMS::GetPlotFrameRef ( ) const
inlineinherited

Definition at line 118 of file pcb_plot_params.h.

118{ return m_plotFrameRef; }

References PCB_PLOT_PARAMS::m_plotFrameRef.

Referenced by DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetPlotInvisibleText()

bool PCB_PLOT_PARAMS::GetPlotInvisibleText ( ) const
inlineinherited

◆ GetPlotMode()

OUTLINE_MODE PCB_PLOT_PARAMS::GetPlotMode ( ) const
inlineinherited

Definition at line 72 of file pcb_plot_params.h.

72{ return m_plotMode; }
OUTLINE_MODE m_plotMode
FILLED or SKETCH selects how to plot filled objects.

References PCB_PLOT_PARAMS::m_plotMode.

Referenced by PCB_PLOT_PARAMS::Format(), DIALOG_PLOT::init_Dialog(), PlotDrillMarks(), PlotFilledAreas(), PlotFootprintShape(), plotOneDrillMark(), PlotPcbShape(), and PlotStandardLayer().

◆ GetPlotOnAllLayersSelection()

LSET PCB_PLOT_PARAMS::GetPlotOnAllLayersSelection ( ) const
inlineinherited

◆ GetPlotReference()

bool PCB_PLOT_PARAMS::GetPlotReference ( ) const
inlineinherited

Definition at line 109 of file pcb_plot_params.h.

109{ return m_plotReference; }

References PCB_PLOT_PARAMS::m_plotReference.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotFootprintTextItems().

◆ GetPlotValue()

bool PCB_PLOT_PARAMS::GetPlotValue ( ) const
inlineinherited

Definition at line 107 of file pcb_plot_params.h.

107{ return m_plotValue; }

References PCB_PLOT_PARAMS::m_plotValue.

Referenced by DIALOG_PLOT::init_Dialog(), and PlotFootprintTextItems().

◆ GetPlotViaOnMaskLayer()

bool PCB_PLOT_PARAMS::GetPlotViaOnMaskLayer ( ) const
inlineinherited

◆ GetScale()

double PCB_PLOT_PARAMS::GetScale ( ) const
inlineinherited

Definition at line 84 of file pcb_plot_params.h.

84{ return m_scale; }
double m_scale
Global scale factor, 1.0 plots a board with its actual size.

References PCB_PLOT_PARAMS::m_scale.

Referenced by ConfigureHPGLPenSizes(), initializePlotter(), and DIALOG_PLOT::Plot().

◆ GetScaleSelection()

int PCB_PLOT_PARAMS::GetScaleSelection ( ) const
inlineinherited

Definition at line 175 of file pcb_plot_params.h.

175{ return m_scaleSelection; }

References PCB_PLOT_PARAMS::m_scaleSelection.

Referenced by DIALOG_PLOT::init_Dialog(), and DIALOG_PLOT::Plot().

◆ GetSketchPadLineWidth()

int PCB_PLOT_PARAMS::GetSketchPadLineWidth ( ) const
inlineinherited

Definition at line 102 of file pcb_plot_params.h.

102{ return m_sketchPadLineWidth; }

References PCB_PLOT_PARAMS::m_sketchPadLineWidth.

Referenced by PlotPad().

◆ GetSketchPadsOnFabLayers()

bool PCB_PLOT_PARAMS::GetSketchPadsOnFabLayers ( ) const
inlineinherited

◆ GetSkipPlotNPTH_Pads()

bool PCB_PLOT_PARAMS::GetSkipPlotNPTH_Pads ( ) const
inlineinherited

Definition at line 42 of file pcb_plot_params.h.

42{ return m_skipNPTH_Pads; }

References PCB_PLOT_PARAMS::m_skipNPTH_Pads.

Referenced by PlotStandardLayer().

◆ GetSubtractMaskFromSilk()

bool PCB_PLOT_PARAMS::GetSubtractMaskFromSilk ( ) const
inlineinherited

◆ GetSvgPrecision()

unsigned PCB_PLOT_PARAMS::GetSvgPrecision ( ) const
inlineinherited

Definition at line 145 of file pcb_plot_params.h.

145{ return m_svgPrecision; }

References PCB_PLOT_PARAMS::m_svgPrecision.

Referenced by DIALOG_PLOT::init_Dialog(), and initializePlotter().

◆ GetTextMode()

PLOT_TEXT_MODE PCB_PLOT_PARAMS::GetTextMode ( ) const
inlineinherited

Definition at line 66 of file pcb_plot_params.h.

67 {
68 return m_textMode;
69 }

References PCB_PLOT_PARAMS::m_textMode.

Referenced by DIALOG_PLOT::init_Dialog(), initializePlotter(), and PlotOneBoardLayer().

◆ GetUseAuxOrigin()

bool PCB_PLOT_PARAMS::GetUseAuxOrigin ( ) const
inlineinherited

◆ GetUseGerberProtelExtensions()

bool PCB_PLOT_PARAMS::GetUseGerberProtelExtensions ( ) const
inlineinherited

◆ GetUseGerberX2format()

bool PCB_PLOT_PARAMS::GetUseGerberX2format ( ) const
inlineinherited

Definition at line 130 of file pcb_plot_params.h.

130{ return m_useGerberX2format; }
bool m_useGerberX2format
Include attributes from the Gerber X2 format (chapter 5 in revision J2)

References PCB_PLOT_PARAMS::m_useGerberX2format.

Referenced by PCB_PLOT_PARAMS::Format(), DIALOG_PLOT::init_Dialog(), and StartPlotBoard().

◆ GetWidthAdjust()

int PCB_PLOT_PARAMS::GetWidthAdjust ( ) const
inlineinherited

Definition at line 91 of file pcb_plot_params.h.

91{ return m_widthAdjust; }
int m_widthAdjust
This width factor is intended to compensate PS printers/ plotters that do not strictly obey line widt...

References PCB_PLOT_PARAMS::m_widthAdjust.

Referenced by getFineWidthAdj().

◆ IsSameAs()

bool PCB_PLOT_PARAMS::IsSameAs ( const PCB_PLOT_PARAMS aPcbPlotParams) const
inherited

Compare current settings to aPcbPlotParams, including not saved parameters in brd file.

Parameters
aPcbPlotParamsis the PCB_PLOT_PARAMS to compare/
aCompareOnlySavedPrmsset to true to compare only saved in file parameters, or false to compare the full set of parameters.
Returns
true is parameters are same, false if one (or more) parameter does not match.

Definition at line 256 of file pcb_plot_params.cpp.

257{
258 if( m_layerSelection != aPcbPlotParams.m_layerSelection )
259 return false;
260
262 return false;
263
265 return false;
266
268 return false;
269
270 if( m_useGerberX2format != aPcbPlotParams.m_useGerberX2format )
271 return false;
272
274 return false;
275
276 if( m_createGerberJobFile != aPcbPlotParams.m_createGerberJobFile )
277 return false;
278
279 if( m_gerberPrecision != aPcbPlotParams.m_gerberPrecision )
280 return false;
281
282 if( m_dashedLineDashRatio != aPcbPlotParams.m_dashedLineDashRatio )
283 return false;
284
285 if( m_dashedLineGapRatio != aPcbPlotParams.m_dashedLineGapRatio )
286 return false;
287
288 if( m_plotFrameRef != aPcbPlotParams.m_plotFrameRef )
289 return false;
290
291 if( m_plotViaOnMaskLayer != aPcbPlotParams.m_plotViaOnMaskLayer )
292 return false;
293
294 if( m_plotMode != aPcbPlotParams.m_plotMode )
295 return false;
296
297 if( m_DXFplotPolygonMode != aPcbPlotParams.m_DXFplotPolygonMode )
298 return false;
299
300 if( m_DXFplotUnits != aPcbPlotParams.m_DXFplotUnits )
301 return false;
302
303 if( m_svgPrecision != aPcbPlotParams.m_svgPrecision )
304 return false;
305
306 if( m_useAuxOrigin != aPcbPlotParams.m_useAuxOrigin )
307 return false;
308
309 if( m_HPGLPenNum != aPcbPlotParams.m_HPGLPenNum )
310 return false;
311
312 if( m_HPGLPenSpeed != aPcbPlotParams.m_HPGLPenSpeed )
313 return false;
314
315 if( m_HPGLPenDiam != aPcbPlotParams.m_HPGLPenDiam )
316 return false;
317
318 if( m_negative != aPcbPlotParams.m_negative )
319 return false;
320
321 if( m_A4Output != aPcbPlotParams.m_A4Output )
322 return false;
323
324 if( m_plotReference != aPcbPlotParams.m_plotReference )
325 return false;
326
327 if( m_plotValue != aPcbPlotParams.m_plotValue )
328 return false;
329
330 if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText )
331 return false;
332
334 return false;
335
336 if( m_subtractMaskFromSilk != aPcbPlotParams.m_subtractMaskFromSilk )
337 return false;
338
339 if( m_format != aPcbPlotParams.m_format )
340 return false;
341
342 if( m_mirror != aPcbPlotParams.m_mirror )
343 return false;
344
345 if( m_drillMarks != aPcbPlotParams.m_drillMarks )
346 return false;
347
348 if( m_scaleSelection != aPcbPlotParams.m_scaleSelection )
349 return false;
350
351 if( m_autoScale != aPcbPlotParams.m_autoScale )
352 return false;
353
354 if( m_scale != aPcbPlotParams.m_scale )
355 return false;
356
357 if( m_fineScaleAdjustX != aPcbPlotParams.m_fineScaleAdjustX )
358 return false;
359
360 if( m_fineScaleAdjustY != aPcbPlotParams.m_fineScaleAdjustY )
361 return false;
362
363 if( m_widthAdjust != aPcbPlotParams.m_widthAdjust )
364 return false;
365
366 if( m_textMode != aPcbPlotParams.m_textMode )
367 return false;
368
369 if( m_blackAndWhite != aPcbPlotParams.m_blackAndWhite )
370 return false;
371
372 if( !m_outputDirectory.IsSameAs( aPcbPlotParams.m_outputDirectory ) )
373 return false;
374
375 return true;
376}

References PCB_PLOT_PARAMS::m_A4Output, PCB_PLOT_PARAMS::m_autoScale, PCB_PLOT_PARAMS::m_blackAndWhite, PCB_PLOT_PARAMS::m_createGerberJobFile, PCB_PLOT_PARAMS::m_dashedLineDashRatio, PCB_PLOT_PARAMS::m_dashedLineGapRatio, PCB_PLOT_PARAMS::m_drillMarks, PCB_PLOT_PARAMS::m_DXFplotPolygonMode, PCB_PLOT_PARAMS::m_DXFplotUnits, PCB_PLOT_PARAMS::m_fineScaleAdjustX, PCB_PLOT_PARAMS::m_fineScaleAdjustY, PCB_PLOT_PARAMS::m_format, PCB_PLOT_PARAMS::m_gerberDisableApertMacros, PCB_PLOT_PARAMS::m_gerberPrecision, PCB_PLOT_PARAMS::m_HPGLPenDiam, PCB_PLOT_PARAMS::m_HPGLPenNum, PCB_PLOT_PARAMS::m_HPGLPenSpeed, PCB_PLOT_PARAMS::m_includeGerberNetlistInfo, PCB_PLOT_PARAMS::m_layerSelection, PCB_PLOT_PARAMS::m_mirror, PCB_PLOT_PARAMS::m_negative, PCB_PLOT_PARAMS::m_outputDirectory, PCB_PLOT_PARAMS::m_plotFrameRef, PCB_PLOT_PARAMS::m_plotInvisibleText, PCB_PLOT_PARAMS::m_plotMode, PCB_PLOT_PARAMS::m_plotOnAllLayersSelection, PCB_PLOT_PARAMS::m_plotReference, PCB_PLOT_PARAMS::m_plotValue, PCB_PLOT_PARAMS::m_plotViaOnMaskLayer, PCB_PLOT_PARAMS::m_scale, PCB_PLOT_PARAMS::m_scaleSelection, PCB_PLOT_PARAMS::m_sketchPadsOnFabLayers, PCB_PLOT_PARAMS::m_subtractMaskFromSilk, PCB_PLOT_PARAMS::m_svgPrecision, PCB_PLOT_PARAMS::m_textMode, PCB_PLOT_PARAMS::m_useAuxOrigin, PCB_PLOT_PARAMS::m_useGerberProtelExtensions, PCB_PLOT_PARAMS::m_useGerberX2format, and PCB_PLOT_PARAMS::m_widthAdjust.

Referenced by DIALOG_PLOT::applyPlotSettings(), and DIALOG_GENDRILL::UpdateDrillParams().

◆ Parse()

void PCB_PLOT_PARAMS::Parse ( PCB_PLOT_PARAMS_PARSER aParser)
inherited

Definition at line 250 of file pcb_plot_params.cpp.

251{
252 aParser->Parse( this );
253}
void Parse(PCB_PLOT_PARAMS *aPcbPlotParams)

References PCB_PLOT_PARAMS_PARSER::Parse().

Referenced by LEGACY_PLUGIN::loadSETUP(), and PCB_PARSER::parseSetup().

◆ PlotBoardGraphicItems()

void BRDITEMS_PLOTTER::PlotBoardGraphicItems ( )

Plot items like text and graphics but not tracks and footprints.

Definition at line 388 of file plot_brditems_plotter.cpp.

389{
390 for( const BOARD_ITEM* item : m_board->Drawings() )
391 PlotPcbGraphicItem( item );
392}
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:70
DRAWINGS & Drawings()
Definition: board.h:310
void PlotPcbGraphicItem(const BOARD_ITEM *item)

References BOARD::Drawings(), m_board, and PlotPcbGraphicItem().

Referenced by PLACEFILE_GERBER_WRITER::CreatePlaceFile(), and PlotStandardLayer().

◆ PlotDimension()

void BRDITEMS_PLOTTER::PlotDimension ( const PCB_DIMENSION_BASE aDim)

Definition at line 444 of file plot_brditems_plotter.cpp.

445{
446 if( !m_layerMask[aDim->GetLayer()] )
447 return;
448
449 PCB_SHAPE draw;
450
452 draw.SetLayer( aDim->GetLayer() );
453
455
456 // Set plot color (change WHITE to LIGHTGRAY because
457 // the white items are not seen on a white paper or screen
459
460 PlotPcbText( &aDim->Text(), aDim->GetLayer(), false );
461
462 for( const std::shared_ptr<SHAPE>& shape : aDim->GetShapes() )
463 {
464 switch( shape->Type() )
465 {
466 case SH_SEGMENT:
467 {
468 const SEG& seg = static_cast<const SHAPE_SEGMENT*>( shape.get() )->GetSeg();
469
471 draw.SetStart( seg.A );
472 draw.SetEnd( seg.B );
473
474 PlotPcbShape( &draw );
475 break;
476 }
477
478 case SH_CIRCLE:
479 {
480 VECTOR2I start( shape->Centre() );
481 int radius = static_cast<const SHAPE_CIRCLE*>( shape.get() )->GetRadius();
482
484 draw.SetFilled( false );
485 draw.SetStart( start );
486 draw.SetEnd( VECTOR2I( start.x + radius, start.y ) );
487
488 PlotPcbShape( &draw );
489 break;
490 }
491
492 default:
493 break;
494 }
495 }
496}
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:192
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:226
LSET m_layerMask
Definition: pcbplot.h:142
void PlotPcbShape(const PCB_SHAPE *aShape)
void PlotPcbText(const EDA_TEXT *aText, PCB_LAYER_ID aLayer, bool aIsKnockout)
void SetFilled(bool aFlag)
Definition: eda_shape.h:95
void SetStart(const VECTOR2I &aStart)
Definition: eda_shape.h:124
void SetShape(SHAPE_T aShape)
Definition: eda_shape.h:112
void SetEnd(const VECTOR2I &aEnd)
Definition: eda_shape.h:149
int GetLineThickness() const
PCB_TEXT & Text()
const std::vector< std::shared_ptr< SHAPE > > & GetShapes() const
void SetStroke(const STROKE_PARAMS &aStroke) override
Definition: pcb_shape.h:72
virtual void SetColor(const COLOR4D &color)=0
Definition: seg.h:42
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50
Simple container to manage line stroke parameters.
Definition: stroke_params.h:88
@ SH_CIRCLE
circle
Definition: shape.h:47
@ SH_SEGMENT
line segment
Definition: shape.h:45
VECTOR2< int > VECTOR2I
Definition: vector2d.h:618

References SEG::A, SEG::B, CIRCLE, color, PCB_PLOT_PARAMS::ColorSettings(), COLOR_SETTINGS::GetColor(), BOARD_ITEM::GetLayer(), PCB_DIMENSION_BASE::GetLineThickness(), PCB_DIMENSION_BASE::GetShapes(), LIGHTGRAY, m_layerMask, m_plotter, PlotPcbShape(), PlotPcbText(), SEGMENT, PLOTTER::SetColor(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFilled(), BOARD_ITEM::SetLayer(), EDA_SHAPE::SetShape(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), SH_CIRCLE, SH_SEGMENT, SOLID, PCB_DIMENSION_BASE::Text(), WHITE, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PlotFootprintGraphicItems(), and PlotPcbGraphicItem().

◆ PlotDrillMarks()

void BRDITEMS_PLOTTER::PlotDrillMarks ( )

Draw a drill mark for pads and vias.

Must be called after all drawings, because it redraws the drill mark on a pad or via, as a negative (i.e. white) shape in FILLED plot mode (for PS and PDF outputs).

Definition at line 1130 of file plot_brditems_plotter.cpp.

1131{
1132 /* If small drills marks were requested prepare a clamp value to pass
1133 to the helper function */
1135 ? pcbIUScale.mmToIU( ADVANCED_CFG::GetCfg().m_SmallDrillMarkSize ) : 0;
1136
1137 /* In the filled trace mode drill marks are drawn white-on-black to scrape
1138 the underlying pad. This works only for drivers supporting color change,
1139 obviously... it means that:
1140 - PS, SVG and PDF output is correct (i.e. you have a 'donut' pad)
1141 - In HPGL you can't see them
1142 - In gerbers you can't see them, too. This is arguably the right thing to
1143 do since having drill marks and high speed drill stations is a sure
1144 recipe for broken tools and angry manufacturers. If you *really* want them
1145 you could start a layer with negative polarity to scrape the film.
1146 - In DXF they go into the 'WHITE' layer. This could be useful.
1147 */
1148 if( GetPlotMode() == FILLED )
1150
1151 for( PCB_TRACK* tracks : m_board->Tracks() )
1152 {
1153 const PCB_VIA* via = dyn_cast<const PCB_VIA*>( tracks );
1154
1155 if( via )
1156 {
1158 wxSize( via->GetDrillValue(), 0 ),
1159 wxSize( via->GetWidth(), 0 ), ANGLE_0, smallDrill );
1160 }
1161 }
1162
1163 for( FOOTPRINT* footprint : m_board->Footprints() )
1164 {
1165 for( PAD* pad : footprint->Pads() )
1166 {
1167 if( pad->GetDrillSize().x == 0 )
1168 continue;
1169
1170 plotOneDrillMark( pad->GetDrillShape(), pad->GetPosition(), pad->GetDrillSize(),
1171 pad->GetSize(), pad->GetOrientation(), smallDrill );
1172 }
1173 }
1174
1175 if( GetPlotMode() == FILLED )
1177}
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:109
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
FOOTPRINTS & Footprints()
Definition: board.h:307
TRACKS & Tracks()
Definition: board.h:304
void plotOneDrillMark(PAD_DRILL_SHAPE_T aDrillShape, const VECTOR2I &aDrillPos, const VECTOR2I &aDrillSize, const VECTOR2I &aPadSize, const EDA_ANGLE &aOrientation, int aSmallDrill)
Helper function to plot a single drill mark.
Definition: pad.h:59
DRILL_MARKS GetDrillMarksType() const
@ BLACK
Definition: color4d.h:44
static constexpr EDA_ANGLE & ANGLE_0
Definition: eda_angle.h:423
@ FILLED
Definition: outline_mode.h:27
@ PAD_DRILL_SHAPE_CIRCLE
Definition: pad_shapes.h:70
constexpr int mmToIU(double mm) const
Definition: base_units.h:89

References ANGLE_0, BLACK, FILLED, BOARD::Footprints(), ADVANCED_CFG::GetCfg(), PCB_PLOT_PARAMS::GetDrillMarksType(), PCB_PLOT_PARAMS::GetPlotMode(), m_board, m_plotter, EDA_IU_SCALE::mmToIU(), pad, PAD_DRILL_SHAPE_CIRCLE, pcbIUScale, plotOneDrillMark(), PLOTTER::SetColor(), SMALL_DRILL_SHAPE, BOARD::Tracks(), via, and WHITE.

Referenced by PlotStandardLayer().

◆ PlotFilledAreas()

void BRDITEMS_PLOTTER::PlotFilledAreas ( const ZONE aZone,
PCB_LAYER_ID  aLayer,
const SHAPE_POLY_SET aPolysList 
)

Definition at line 882 of file plot_brditems_plotter.cpp.

884{
885 if( polysList.IsEmpty() )
886 return;
887
888 GBR_METADATA gbr_metadata;
889
890 bool isOnCopperLayer = aZone->IsOnCopperLayer();
891
892 if( isOnCopperLayer )
893 {
894 gbr_metadata.SetNetName( aZone->GetNetname() );
895 gbr_metadata.SetCopper( true );
896
897 // Zones with no net name can exist.
898 // they are not used to connect items, so the aperture attribute cannot
899 // be set as conductor
900 if( aZone->GetNetname().IsEmpty() )
901 {
902 gbr_metadata.SetApertureAttrib(
904 }
905 else
906 {
909 }
910 }
911
912 m_plotter->SetColor( getColor( aLayer ) );
913
914 m_plotter->StartBlock( nullptr ); // Clean current object attributes
915
916 /*
917 * In non filled mode the outline is plotted, but not the filling items
918 */
919
920 for( int idx = 0; idx < polysList.OutlineCount(); ++idx )
921 {
922 const SHAPE_LINE_CHAIN& outline = polysList.Outline( idx );
923
924 // Plot the current filled area (as region for Gerber plotter to manage attributes)
925 if( GetPlotMode() == FILLED )
926 {
928 {
929 static_cast<GERBER_PLOTTER*>( m_plotter )->PlotGerberRegion( outline,
930 &gbr_metadata );
931 }
932 else
933 {
934 m_plotter->PlotPoly( outline, FILL_T::FILLED_SHAPE, 0, &gbr_metadata );
935 }
936 }
937 else
938 {
940 }
941 }
942
943 m_plotter->EndBlock( nullptr ); // Clear object attributes
944}
COLOR4D getColor(int aLayer) const
White color is special because it cannot be seen on a white paper in B&W mode.
Metadata which can be added in a gerber file as attribute in X2 format.
Definition: gbr_metadata.h:205
void SetCopper(bool aValue)
Definition: gbr_metadata.h:252
void SetNetName(const wxString &aNetname)
Definition: gbr_metadata.h:229
void SetApertureAttrib(GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB aApertAttribute)
Definition: gbr_metadata.h:209
void SetNetAttribType(int aNetAttribType)
Definition: gbr_metadata.h:219
@ GBR_NETINFO_NET
print info associated to a net (TO.N attribute)
virtual PLOT_FORMAT GetPlotterType() const =0
Returns the effective plot engine in use.
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
virtual void StartBlock(void *aData)
calling this function allows one to define the beginning of a group of drawing items,...
Definition: plotter.h:518
virtual void PlotPoly(const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
Draw a polygon ( filled or not ).
virtual void EndBlock(void *aData)
calling this function allows one to define the end of a group of drawing items for instance in SVG or...
Definition: plotter.h:527
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
bool IsOnCopperLayer() const override
Definition: zone.cpp:254
@ FILLED_SHAPE

References PLOTTER::EndBlock(), FILLED, FILLED_SHAPE, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONDUCTOR, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR, GBR_NETLIST_METADATA::GBR_NETINFO_NET, GERBER, getColor(), BOARD_CONNECTED_ITEM::GetNetname(), PCB_PLOT_PARAMS::GetPlotMode(), PLOTTER::GetPlotterType(), SHAPE_POLY_SET::IsEmpty(), ZONE::IsOnCopperLayer(), m_plotter, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PLOTTER::PlotPoly(), GBR_METADATA::SetApertureAttrib(), PLOTTER::SetColor(), GBR_METADATA::SetCopper(), PLOTTER::SetCurrentLineWidth(), GBR_METADATA::SetNetAttribType(), GBR_METADATA::SetNetName(), and PLOTTER::StartBlock().

Referenced by PlotSolderMaskLayer(), and PlotStandardLayer().

◆ PlotFootprintGraphicItems()

void BRDITEMS_PLOTTER::PlotFootprintGraphicItems ( const FOOTPRINT aFootprint)

Definition at line 553 of file plot_brditems_plotter.cpp.

554{
555 for( const BOARD_ITEM* item : aFootprint->GraphicalItems() )
556 {
557 if( aFootprint->GetPrivateLayers().test( item->GetLayer() ) )
558 continue;
559
560 switch( item->Type() )
561 {
562 case PCB_FP_SHAPE_T:
563 {
564 const FP_SHAPE* shape = static_cast<const FP_SHAPE*>( item );
565
566 if( m_layerMask[ shape->GetLayer() ] )
567 PlotFootprintShape( shape );
568
569 break;
570 }
571
572 case PCB_FP_TEXTBOX_T:
573 {
574 const FP_TEXTBOX* textbox = static_cast<const FP_TEXTBOX*>( item );
575
576 if( m_layerMask[ textbox->GetLayer() ] )
577 {
578 PlotPcbText( textbox, textbox->GetLayer(), textbox->IsKnockout() );
579 PlotFootprintShape( textbox );
580 }
581
582 break;
583 }
584
590 {
591 const PCB_DIMENSION_BASE* dimension = static_cast<const PCB_DIMENSION_BASE*>( item );
592
593 if( m_layerMask[ dimension->GetLayer() ] )
594 PlotDimension( dimension );
595
596 break;
597 }
598
599 case PCB_FP_TEXT_T:
600 // Plotted in PlotFootprintTextItem()
601 break;
602
603 default:
604 UNIMPLEMENTED_FOR( item->GetClass() );
605 }
606 }
607}
virtual bool IsKnockout() const
Definition: board_item.h:262
void PlotDimension(const PCB_DIMENSION_BASE *aDim)
void PlotFootprintShape(const FP_SHAPE *aShape)
LSET GetPrivateLayers() const
Definition: footprint.h:120
DRAWINGS & GraphicalItems()
Definition: footprint.h:173
Abstract dimension API.
Definition: pcb_dimension.h:96
#define UNIMPLEMENTED_FOR(type)
Definition: macros.h:120
@ PCB_FP_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
Definition: typeinfo.h:95
@ PCB_FP_SHAPE_T
class FP_SHAPE, a footprint edge
Definition: typeinfo.h:94
@ PCB_FP_TEXTBOX_T
class FP_TEXTBOX, wrapped text in a footprint
Definition: typeinfo.h:93
@ PCB_FP_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
Definition: typeinfo.h:97
@ PCB_FP_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
Definition: typeinfo.h:99
@ PCB_FP_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
Definition: typeinfo.h:96
@ PCB_FP_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
Definition: typeinfo.h:98
@ PCB_FP_TEXT_T
class FP_TEXT, text in a footprint
Definition: typeinfo.h:92

References BOARD_ITEM::GetLayer(), FOOTPRINT::GetPrivateLayers(), FOOTPRINT::GraphicalItems(), BOARD_ITEM::IsKnockout(), m_layerMask, PCB_FP_DIM_ALIGNED_T, PCB_FP_DIM_CENTER_T, PCB_FP_DIM_LEADER_T, PCB_FP_DIM_ORTHOGONAL_T, PCB_FP_DIM_RADIAL_T, PCB_FP_SHAPE_T, PCB_FP_TEXT_T, PCB_FP_TEXTBOX_T, PlotDimension(), PlotFootprintShape(), PlotPcbText(), and UNIMPLEMENTED_FOR.

Referenced by PlotStandardLayer().

◆ PlotFootprintShape()

void BRDITEMS_PLOTTER::PlotFootprintShape ( const FP_SHAPE aShape)

Definition at line 610 of file plot_brditems_plotter.cpp.

611{
612 m_plotter->SetColor( getColor( aShape->GetLayer() ) );
613
614 bool sketch = GetPlotMode() == SKETCH;
615 int thickness = aShape->GetWidth();
616
617 GBR_METADATA gbr_metadata;
619 const FOOTPRINT* parent = static_cast<const FOOTPRINT*> ( aShape->GetParent() );
620 gbr_metadata.SetCmpReference( parent->GetReference() );
621
622 bool isOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
623
624 if( aShape->GetLayer() == Edge_Cuts ) // happens also when plotting copper layers
625 {
627 }
628 else if( isOnCopperLayer ) // only for items not on Edge_Cuts.
629 {
631 gbr_metadata.SetCopper( true );
632 }
633
634 int radius; // Circle/arc radius.
635 PLOT_DASH_TYPE lineStyle = aShape->GetStroke().GetPlotStyle();
636
637 if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
638 {
639 switch( aShape->GetShape() )
640 {
641 case SHAPE_T::SEGMENT:
642 m_plotter->ThickSegment( aShape->GetStart(), aShape->GetEnd(), thickness, GetPlotMode(),
643 &gbr_metadata );
644 break;
645
646 case SHAPE_T::RECT:
647 {
648 std::vector<VECTOR2I> pts = aShape->GetRectCorners();
649
650 if( sketch || thickness > 0 )
651 {
652 m_plotter->ThickSegment( pts[0], pts[1], thickness, GetPlotMode(), &gbr_metadata );
653 m_plotter->ThickSegment( pts[1], pts[2], thickness, GetPlotMode(), &gbr_metadata );
654 m_plotter->ThickSegment( pts[2], pts[3], thickness, GetPlotMode(), &gbr_metadata );
655 m_plotter->ThickSegment( pts[3], pts[0], thickness, GetPlotMode(), &gbr_metadata );
656 }
657
658 if( !sketch && aShape->IsFilled() )
659 {
660 SHAPE_LINE_CHAIN poly;
661
662 for( const VECTOR2I& pt : pts )
663 poly.Append( pt );
664
665 m_plotter->PlotPoly( poly, FILL_T::FILLED_SHAPE, -1, &gbr_metadata );
666 }
667 }
668 break;
669
670 case SHAPE_T::CIRCLE:
671 radius = KiROUND( GetLineLength( aShape->GetStart(), aShape->GetEnd() ) );
672
673 if( aShape->IsFilled() )
674 {
675 m_plotter->FilledCircle( aShape->GetStart(), radius * 2 + thickness, GetPlotMode(),
676 &gbr_metadata );
677 }
678 else
679 {
680 m_plotter->ThickCircle( aShape->GetStart(), radius * 2, thickness, GetPlotMode(),
681 &gbr_metadata );
682 }
683
684 break;
685
686 case SHAPE_T::ARC:
687 {
688 radius = KiROUND( GetLineLength( aShape->GetCenter(), aShape->GetStart() ) );
689
690 // when startAngle == endAngle ThickArc() doesn't know whether it's 0 deg and 360 deg
691 // but it is a circle
692 if( std::abs( aShape->GetArcAngle().AsDegrees() ) == 360.0 )
693 {
694 m_plotter->ThickCircle( aShape->GetCenter(), radius * 2, thickness, GetPlotMode(),
695 &gbr_metadata );
696 }
697 else
698 {
699 m_plotter->ThickArc( *aShape, GetPlotMode(), &gbr_metadata );
700 }
701 }
702 break;
703
704 case SHAPE_T::POLY:
705 if( aShape->IsPolyShapeValid() )
706 {
707 std::vector<VECTOR2I> cornerList;
708 aShape->DupPolyPointsList( cornerList );
709
710 // We must compute board coordinates from m_PolyList which are relative to the parent
711 // position at orientation 0
712 const FOOTPRINT *parentFootprint = aShape->GetParentFootprint();
713
714 if( parentFootprint )
715 {
716 for( unsigned ii = 0; ii < cornerList.size(); ++ii )
717 {
718 RotatePoint( cornerList[ii], parentFootprint->GetOrientation() );
719 cornerList[ii] += parentFootprint->GetPosition();
720 }
721 }
722
723 if( sketch )
724 {
725 for( size_t i = 1; i < cornerList.size(); i++ )
726 {
727 m_plotter->ThickSegment( cornerList[i - 1], cornerList[i], thickness,
728 GetPlotMode(), &gbr_metadata );
729 }
730
731 m_plotter->ThickSegment( cornerList.back(), cornerList.front(), thickness,
732 GetPlotMode(), &gbr_metadata );
733
734 }
735 else
736 {
737 // This must be simplified and fractured to prevent overlapping polygons
738 // from generating invalid Gerber files
739
740 SHAPE_LINE_CHAIN line( cornerList );
741 SHAPE_POLY_SET tmpPoly;
742
743 line.SetClosed( true );
744 tmpPoly.AddOutline( line );
746
747 for( int jj = 0; jj < tmpPoly.OutlineCount(); ++jj )
748 {
749 SHAPE_LINE_CHAIN &poly = tmpPoly.Outline( jj );
752 thickness, &gbr_metadata );
753 }
754 }
755 }
756
757 break;
758
759 case SHAPE_T::BEZIER:
760 m_plotter->BezierCurve( aShape->GetStart(), aShape->GetBezierC1(),
761 aShape->GetBezierC2(), aShape->GetEnd(), 0, thickness );
762 break;
763
764 default:
765 wxASSERT_MSG( false, wxT( "Unhandled FP_SHAPE shape" ) );
766 break;
767 }
768 }
769 else
770 {
771 std::vector<SHAPE*> shapes = aShape->MakeEffectiveShapes( true );
772
773 for( SHAPE* shape : shapes )
774 {
775 STROKE_PARAMS::Stroke( shape, lineStyle, thickness, m_plotter->RenderSettings(),
776 [&]( const VECTOR2I& a, const VECTOR2I& b )
777 {
778 m_plotter->ThickSegment( a, b, thickness, GetPlotMode(),
779 &gbr_metadata );
780 } );
781 }
782
783 for( SHAPE* shape : shapes )
784 delete shape;
785 }
786}
BOARD_ITEM_CONTAINER * GetParent() const
Definition: board_item.h:175
double AsDegrees() const
Definition: eda_angle.h:149
EDA_ANGLE GetArcAngle() const
Definition: eda_shape.cpp:585
const VECTOR2I & GetBezierC2() const
Definition: eda_shape.h:179
virtual std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const
Make a set of SHAPE objects representing the EDA_SHAPE.
Definition: eda_shape.h:289
bool IsFilled() const
Definition: eda_shape.h:90
SHAPE_T GetShape() const
Definition: eda_shape.h:113
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
Definition: eda_shape.h:145
void DupPolyPointsList(std::vector< VECTOR2I > &aBuffer) const
Duplicate the list of corners in a std::vector<VECTOR2I>
Definition: eda_shape.cpp:1225
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
Definition: eda_shape.h:120
std::vector< VECTOR2I > GetRectCorners() const
Definition: eda_shape.cpp:1035
int GetWidth() const
Definition: eda_shape.h:109
const VECTOR2I & GetBezierC1() const
Definition: eda_shape.h:176
bool IsPolyShapeValid() const
Definition: eda_shape.cpp:1242
EDA_ANGLE GetOrientation() const
Definition: footprint.h:191
const wxString & GetReference() const
Definition: footprint.h:519
VECTOR2I GetPosition() const override
Definition: footprint.h:188
@ GBR_APERTURE_ATTRIB_ETCHEDCMP
aperture used for etched components.
Definition: gbr_metadata.h:94
@ GBR_APERTURE_ATTRIB_EDGECUT
aperture used for board cutout,
Definition: gbr_metadata.h:98
void SetCmpReference(const wxString &aComponentRef)
Definition: gbr_metadata.h:241
@ GBR_NETINFO_CMP
print info associated to a component (TO.C attribute)
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:773
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition: pcb_shape.h:67
FOOTPRINT * GetParentFootprint() const
Return the parent footprint or NULL if PCB_SHAPE does not belong to a footprint.
Definition: pcb_shape.cpp:252
STROKE_PARAMS GetStroke() const override
Definition: pcb_shape.h:71
virtual void ThickSegment(const VECTOR2I &start, const VECTOR2I &end, int width, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:549
virtual void ThickCircle(const VECTOR2I &pos, int diametre, int width, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:652
virtual void FilledCircle(const VECTOR2I &pos, int diametre, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:668
virtual void BezierCurve(const VECTOR2I &aStart, const VECTOR2I &aControl1, const VECTOR2I &aControl2, const VECTOR2I &aEnd, int aTolerance, int aLineThickness=USE_DEFAULT_LINE_WIDTH)
Generic fallback: Cubic Bezier curve rendered as a polyline In KiCad the bezier curves have 4 control...
Definition: plotter.cpp:224
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:141
virtual void ThickArc(const VECTOR2I &aCentre, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, OUTLINE_MODE aTraceMode, void *aData)
Definition: plotter.cpp:592
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
Represent a set of closed polygons.
void Fracture(POLYGON_MODE aFastMode)
Convert a single outline slitted ("fractured") polygon into a set ouf outlines with holes.
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new hole to the given outline (default: last) and returns its index.
SHAPE_LINE_CHAIN & Outline(int aIndex)
int OutlineCount() const
Return the number of vertices in a given outline/hole.
An abstract shape on 2D plane.
Definition: shape.h:123
static void Stroke(const SHAPE *aShape, PLOT_DASH_TYPE aLineStyle, int aWidth, const KIGFX::RENDER_SETTINGS *aRenderSettings, std::function< void(const VECTOR2I &a, const VECTOR2I &b)> aStroker)
PLOT_DASH_TYPE GetPlotStyle() const
@ Edge_Cuts
Definition: layer_ids.h:113
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
Definition: eda_angle.h:412
PLOT_DASH_TYPE
Dashed line types.
Definition: stroke_params.h:48
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Definition: trigo.cpp:183
double GetLineLength(const VECTOR2I &aPointA, const VECTOR2I &aPointB)
Return the length of a line segment defined by aPointA and aPointB.
Definition: trigo.h:188
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:85

References std::abs(), SHAPE_POLY_SET::AddOutline(), LSET::AllCuMask(), SHAPE_LINE_CHAIN::Append(), ARC, EDA_ANGLE::AsDegrees(), BEZIER, PLOTTER::BezierCurve(), CIRCLE, EDA_SHAPE::DupPolyPointsList(), Edge_Cuts, FILLED_SHAPE, PLOTTER::FilledCircle(), FIRST_TYPE, SHAPE_POLY_SET::Fracture(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_ETCHEDCMP, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, EDA_SHAPE::GetArcAngle(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), PCB_SHAPE::GetCenter(), getColor(), EDA_SHAPE::GetEnd(), BOARD_ITEM::GetLayer(), GetLineLength(), FOOTPRINT::GetOrientation(), BOARD_ITEM::GetParent(), PCB_SHAPE::GetParentFootprint(), PCB_PLOT_PARAMS::GetPlotMode(), STROKE_PARAMS::GetPlotStyle(), FOOTPRINT::GetPosition(), EDA_SHAPE::GetRectCorners(), FOOTPRINT::GetReference(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), PCB_SHAPE::GetStroke(), EDA_SHAPE::GetWidth(), EDA_SHAPE::IsFilled(), EDA_SHAPE::IsPolyShapeValid(), KiROUND(), m_layerMask, m_plotter, EDA_SHAPE::MakeEffectiveShapes(), NO_FILL, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PLOTTER::PlotPoly(), SHAPE_POLY_SET::PM_FAST, POLY, RECT, PLOTTER::RenderSettings(), RotatePoint(), SEGMENT, GBR_METADATA::SetApertureAttrib(), SHAPE_LINE_CHAIN::SetClosed(), GBR_METADATA::SetCmpReference(), PLOTTER::SetColor(), GBR_METADATA::SetCopper(), GBR_METADATA::SetNetAttribType(), SKETCH, STROKE_PARAMS::Stroke(), PLOTTER::ThickArc(), PLOTTER::ThickCircle(), and PLOTTER::ThickSegment().

Referenced by PLACEFILE_GERBER_WRITER::CreatePlaceFile(), PlotFootprintGraphicItems(), and PlotSolderMaskLayer().

◆ PlotFootprintTextItem()

void BRDITEMS_PLOTTER::PlotFootprintTextItem ( const FP_TEXT aText,
const COLOR4D aColor 
)

Definition at line 395 of file plot_brditems_plotter.cpp.

396{
397 COLOR4D color = aColor;
398
399 if( aColor == COLOR4D::WHITE )
401
403
404 // calculate some text parameters :
405 VECTOR2I size = aText->GetTextSize();
406 VECTOR2I pos = aText->GetTextPos();
407 int thickness = aText->GetEffectiveTextPenWidth();
408 KIFONT::FONT* font = aText->GetFont();
409
410 if( !font )
411 {
414 : wxString( wxEmptyString ),
415 aText->IsBold(), aText->IsItalic() );
416 }
417
418 if( aText->IsMirrored() )
419 size.x = -size.x; // Text is mirrored
420
421 // Non bold texts thickness is clamped at 1/6 char size by the low level draw function.
422 // but in Pcbnew we do not manage bold texts and thickness up to 1/4 char size
423 // (like bold text) and we manage the thickness.
424 // So we set bold flag to true
425 bool allow_bold = true;
426
427 GBR_METADATA gbr_metadata;
428
429 if( IsCopperLayer( aText->GetLayer() ) )
431
433 const FOOTPRINT* parent = static_cast<const FOOTPRINT*> ( aText->GetParent() );
434 gbr_metadata.SetCmpReference( parent->GetReference() );
435
436 m_plotter->SetCurrentLineWidth( thickness );
437
438 m_plotter->Text( pos, aColor, aText->GetShownText(), aText->GetDrawRotation(), size,
439 aText->GetHorizJustify(), aText->GetVertJustify(), thickness,
440 aText->IsItalic(), allow_bold, false, font, &gbr_metadata );
441}
const VECTOR2I & GetTextPos() const
Definition: eda_text.h:208
bool IsItalic() const
Definition: eda_text.h:130
KIFONT::FONT * GetFont() const
Definition: eda_text.h:188
GR_TEXT_H_ALIGN_T GetHorizJustify() const
Definition: eda_text.h:149
bool IsMirrored() const
Definition: eda_text.h:139
int GetEffectiveTextPenWidth(int aDefaultPenWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
Definition: eda_text.cpp:297
bool IsBold() const
Definition: eda_text.h:133
GR_TEXT_V_ALIGN_T GetVertJustify() const
Definition: eda_text.h:152
VECTOR2I GetTextSize() const
Definition: eda_text.h:196
virtual EDA_ANGLE GetDrawRotation() const override
Definition: fp_text.cpp:247
virtual wxString GetShownText(int aDepth=0, bool aAllowExtraText=true) const override
Return the string actually shown after processing of the base text.
Definition: fp_text.cpp:415
FONT is an abstract base class for both outline and stroke fonts.
Definition: font.h:105
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false)
Definition: font.cpp:65
const wxString & GetDefaultFont() const
virtual void Text(const VECTOR2I &aPos, const COLOR4D &aColor, const wxString &aText, const EDA_ANGLE &aOrient, const VECTOR2I &aSize, enum GR_TEXT_H_ALIGN_T aH_justify, enum GR_TEXT_V_ALIGN_T aV_justify, int aPenWidth, bool aItalic, bool aBold, bool aMultilineAllowed, KIFONT::FONT *aFont, void *aData=nullptr)
Draw text with the plotter.
Definition: plotter.cpp:714
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
Definition: layer_ids.h:825

References color, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, KIGFX::RENDER_SETTINGS::GetDefaultFont(), FP_TEXT::GetDrawRotation(), EDA_TEXT::GetEffectiveTextPenWidth(), EDA_TEXT::GetFont(), KIFONT::FONT::GetFont(), EDA_TEXT::GetHorizJustify(), BOARD_ITEM::GetLayer(), BOARD_ITEM::GetParent(), FOOTPRINT::GetReference(), FP_TEXT::GetShownText(), EDA_TEXT::GetTextPos(), EDA_TEXT::GetTextSize(), EDA_TEXT::GetVertJustify(), EDA_TEXT::IsBold(), IsCopperLayer(), EDA_TEXT::IsItalic(), EDA_TEXT::IsMirrored(), LIGHTGRAY, m_plotter, PLOTTER::RenderSettings(), GBR_METADATA::SetApertureAttrib(), GBR_METADATA::SetCmpReference(), PLOTTER::SetColor(), PLOTTER::SetCurrentLineWidth(), GBR_METADATA::SetNetAttribType(), PLOTTER::Text(), WHITE, and VECTOR2< T >::x.

Referenced by PlotFootprintTextItems().

◆ PlotFootprintTextItems()

void BRDITEMS_PLOTTER::PlotFootprintTextItems ( const FOOTPRINT aFootprint)

Definition at line 297 of file plot_brditems_plotter.cpp.

298{
299 const FP_TEXT* textItem = &aFootprint->Reference();
300 int textLayer = textItem->GetLayer();
301
302 // Reference and value are specific items, not in graphic items list
303 if( GetPlotReference() && m_layerMask[textLayer]
304 && ( textItem->IsVisible() || GetPlotInvisibleText() ) )
305 {
306 PlotFootprintTextItem( textItem, getColor( textLayer ) );
307 }
308
309 textItem = &aFootprint->Value();
310 textLayer = textItem->GetLayer();
311
312 if( GetPlotValue() && m_layerMask[textLayer]
313 && ( textItem->IsVisible() || GetPlotInvisibleText() ) )
314 {
315 PlotFootprintTextItem( textItem, getColor( textLayer ) );
316 }
317
318 for( const BOARD_ITEM* item : aFootprint->GraphicalItems() )
319 {
320 textItem = dyn_cast<const FP_TEXT*>( item );
321
322 if( !textItem )
323 continue;
324
325 if( !textItem->IsVisible() )
326 continue;
327
328 textLayer = textItem->GetLayer();
329
330 if( textLayer == Edge_Cuts || textLayer >= PCB_LAYER_ID_COUNT )
331 continue;
332
333 if( !m_layerMask[textLayer] || aFootprint->GetPrivateLayers().test( textLayer ) )
334 continue;
335
336 if( textItem->GetText() == wxT( "${REFERENCE}" ) && !GetPlotReference() )
337 continue;
338
339 if( textItem->GetText() == wxT( "${VALUE}" ) && !GetPlotValue() )
340 continue;
341
342 PlotFootprintTextItem( textItem, getColor( textLayer ) );
343 }
344}
void PlotFootprintTextItem(const FP_TEXT *aText, const COLOR4D &aColor)
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:87
virtual bool IsVisible() const
Definition: eda_text.h:136
FP_TEXT & Value()
read/write accessors:
Definition: footprint.h:567
FP_TEXT & Reference()
Definition: footprint.h:568
bool GetPlotInvisibleText() const
bool GetPlotReference() const
bool GetPlotValue() const
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:137

References Edge_Cuts, getColor(), BOARD_ITEM::GetLayer(), PCB_PLOT_PARAMS::GetPlotInvisibleText(), PCB_PLOT_PARAMS::GetPlotReference(), PCB_PLOT_PARAMS::GetPlotValue(), FOOTPRINT::GetPrivateLayers(), EDA_TEXT::GetText(), FOOTPRINT::GraphicalItems(), EDA_TEXT::IsVisible(), m_layerMask, PCB_LAYER_ID_COUNT, PlotFootprintTextItem(), FOOTPRINT::Reference(), and FOOTPRINT::Value().

Referenced by PlotSolderMaskLayer(), and PlotStandardLayer().

◆ plotOneDrillMark()

void BRDITEMS_PLOTTER::plotOneDrillMark ( PAD_DRILL_SHAPE_T  aDrillShape,
const VECTOR2I aDrillPos,
const VECTOR2I aDrillSize,
const VECTOR2I aPadSize,
const EDA_ANGLE aOrientation,
int  aSmallDrill 
)
private

Helper function to plot a single drill mark.

It compensate and clamp the drill mark size depending on the current plot options.

Definition at line 1102 of file plot_brditems_plotter.cpp.

1105{
1106 VECTOR2I drillSize = aDrillSize;
1107
1108 // Small drill marks have no significance when applied to slots
1109 if( aSmallDrill && aDrillShape == PAD_DRILL_SHAPE_CIRCLE )
1110 drillSize.x = std::min( aSmallDrill, drillSize.x );
1111
1112 // Round holes only have x diameter, slots have both
1113 drillSize.x -= getFineWidthAdj();
1114 drillSize.x = Clamp( 1, drillSize.x, aPadSize.x - 1 );
1115
1116 if( aDrillShape == PAD_DRILL_SHAPE_OBLONG )
1117 {
1118 drillSize.y -= getFineWidthAdj();
1119 drillSize.y = Clamp( 1, drillSize.y, aPadSize.y - 1 );
1120
1121 m_plotter->FlashPadOval( aDrillPos, drillSize, aOrientation, GetPlotMode(), nullptr );
1122 }
1123 else
1124 {
1125 m_plotter->FlashPadCircle( aDrillPos, drillSize.x, GetPlotMode(), nullptr );
1126 }
1127}
int getFineWidthAdj() const
Definition: pcbplot.h:71
virtual void FlashPadCircle(const VECTOR2I &aPadPos, int aDiameter, OUTLINE_MODE aTraceMode, void *aData)=0
virtual void FlashPadOval(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
@ PAD_DRILL_SHAPE_OBLONG
Definition: pad_shapes.h:71
constexpr T Clamp(const T &lower, const T &value, const T &upper)
Limit value within the range lower <= value <= upper.
Definition: util.h:64

References Clamp(), PLOTTER::FlashPadCircle(), PLOTTER::FlashPadOval(), getFineWidthAdj(), PCB_PLOT_PARAMS::GetPlotMode(), m_plotter, PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PlotDrillMarks().

◆ PlotPad()

void BRDITEMS_PLOTTER::PlotPad ( const PAD aPad,
const COLOR4D aColor,
OUTLINE_MODE  aPlotMode 
)

Plot a pad.

Unlike other items, a pad had not a specific color and be drawn as a non filled item although the plot mode is filled color and plot mode are needed by this function.

Definition at line 83 of file plot_brditems_plotter.cpp.

84{
85 VECTOR2I shape_pos = aPad->ShapePos();
86 GBR_METADATA gbr_metadata;
87
88 bool plotOnCopperLayer = ( m_layerMask & LSET::AllCuMask() ).any();
89 bool plotOnExternalCopperLayer = ( m_layerMask & LSET::ExternalCuMask() ).any();
90
91 // Pad not on the solder mask layer cannot be soldered.
92 // therefore it can have a specific aperture attribute.
93 // Not yet in use.
94 // bool isPadOnBoardTechLayers = ( aPad->GetLayerSet() & LSET::AllBoardTechMask() ).any();
95
96 gbr_metadata.SetCmpReference( aPad->GetParent()->GetReference() );
97
98 if( plotOnCopperLayer )
99 {
100 gbr_metadata.SetNetAttribType( GBR_NETINFO_ALL );
101 gbr_metadata.SetCopper( true );
102
103 // Gives a default attribute, for instance for pads used as tracks in net ties:
104 // Connector pads and SMD pads are on external layers
105 // if on internal layers, they are certainly used as net tie
106 // and are similar to tracks: just conductor items
108
109 const bool useUTF8 = false;
110 const bool useQuoting = false;
111 gbr_metadata.SetPadName( aPad->GetNumber(), useUTF8, useQuoting );
112
113 if( !aPad->GetNumber().IsEmpty() )
114 gbr_metadata.SetPadPinFunction( aPad->GetPinFunction(), useUTF8, useQuoting );
115
116 gbr_metadata.SetNetName( aPad->GetNetname() );
117
118 // Some pads are mechanical pads ( through hole or smd )
119 // when this is the case, they have no pad name and/or are not plated.
120 // In this case gerber files have slightly different attributes.
121 if( aPad->GetAttribute() == PAD_ATTRIB::NPTH || aPad->GetNumber().IsEmpty() )
122 gbr_metadata.m_NetlistMetadata.m_NotInNet = true;
123
124 if( !plotOnExternalCopperLayer )
125 {
126 // the .P object attribute (GBR_NETLIST_METADATA::GBR_NETINFO_PAD)
127 // is used on outer layers, unless the component is embedded
128 // or a "etched" component (fp only drawn, not a physical component)
129 // Currently, Pcbnew does not handle embedded component, so we disable the .P
130 // attribute on internal layers
131 // Note the Gerber doc is not really clear about through holes pads about the .P
134
135 }
136
137 // Some attributes are reserved to the external copper layers:
138 // GBR_APERTURE_ATTRIB_CONNECTORPAD and GBR_APERTURE_ATTRIB_SMDPAD_CUDEF
139 // for instance.
140 // Pad with type PAD_ATTRIB::CONN or PAD_ATTRIB::SMD that is not on outer layer
141 // has its aperture attribute set to GBR_APERTURE_ATTRIB_CONDUCTOR
142 switch( aPad->GetAttribute() )
143 {
144 case PAD_ATTRIB::NPTH: // Mechanical pad through hole
146 break;
147
148 case PAD_ATTRIB::PTH : // Pad through hole, a hole is also expected
149 gbr_metadata.SetApertureAttrib(
151 break;
152
153 case PAD_ATTRIB::CONN: // Connector pads, no solder paste but with solder mask.
154 if( plotOnExternalCopperLayer )
155 gbr_metadata.SetApertureAttrib(
157 break;
158
159 case PAD_ATTRIB::SMD: // SMD pads (on external copper layer only)
160 // with solder paste and mask
161 if( plotOnExternalCopperLayer )
162 gbr_metadata.SetApertureAttrib(
164 break;
165 }
166
167 // Fabrication properties can have specific GBR_APERTURE_METADATA options
168 // that replace previous aperture attribute:
169 switch( aPad->GetProperty() )
170 {
171 case PAD_PROP::BGA: // Only applicable to outer layers
172 if( plotOnExternalCopperLayer )
173 gbr_metadata.SetApertureAttrib(
175 break;
176
178 gbr_metadata.SetApertureAttrib(
180 break;
181
183 gbr_metadata.SetApertureAttrib(
185 break;
186
187 case PAD_PROP::TESTPOINT: // Only applicable to outer layers
188 if( plotOnExternalCopperLayer )
189 gbr_metadata.SetApertureAttrib(
191 break;
192
194 gbr_metadata.SetApertureAttrib(
196 break;
197
199 gbr_metadata.SetApertureAttrib(
201 break;
202
203 case PAD_PROP::NONE:
204 break;
205 }
206
207 // Ensure NPTH pads have *always* the GBR_APERTURE_ATTRIB_WASHERPAD attribute
208 if( aPad->GetAttribute() == PAD_ATTRIB::NPTH )
210 }
211 else
212 {
214 }
215
216 // Set plot color (change WHITE to LIGHTGRAY because
217 // the white items are not seen on a white paper or screen
218 m_plotter->SetColor( aColor != WHITE ? aColor : LIGHTGRAY);
219
220 if( aPlotMode == SKETCH )
222
223 switch( aPad->GetShape() )
224 {
226 m_plotter->FlashPadCircle( shape_pos, aPad->GetSize().x, aPlotMode, &gbr_metadata );
227 break;
228
229 case PAD_SHAPE::OVAL:
230 m_plotter->FlashPadOval( shape_pos, aPad->GetSize(), aPad->GetOrientation(), aPlotMode,
231 &gbr_metadata );
232 break;
233
234 case PAD_SHAPE::RECT:
235 m_plotter->FlashPadRect( shape_pos, aPad->GetSize(), aPad->GetOrientation(), aPlotMode,
236 &gbr_metadata );
237 break;
238
240 m_plotter->FlashPadRoundRect( shape_pos, aPad->GetSize(), aPad->GetRoundRectCornerRadius(),
241 aPad->GetOrientation(), aPlotMode, &gbr_metadata );
242 break;
243
245 {
246 // Build the pad polygon in coordinates relative to the pad
247 // (i.e. for a pad at pos 0,0, rot 0.0). Needed to use aperture macros,
248 // to be able to create a pattern common to all trapezoid pads having the same shape
249 VECTOR2I coord[4];
250
251 // Order is lower left, lower right, upper right, upper left.
252 VECTOR2I half_size = aPad->GetSize() / 2;
253 VECTOR2I trap_delta = aPad->GetDelta() / 2;
254
255 coord[0] = VECTOR2I( -half_size.x - trap_delta.y, half_size.y + trap_delta.x );
256 coord[1] = VECTOR2I( half_size.x + trap_delta.y, half_size.y - trap_delta.x );
257 coord[2] = VECTOR2I( half_size.x - trap_delta.y, -half_size.y + trap_delta.x );
258 coord[3] = VECTOR2I( -half_size.x + trap_delta.y, -half_size.y - trap_delta.x );
259
260 m_plotter->FlashPadTrapez( shape_pos, coord, aPad->GetOrientation(), aPlotMode,
261 &gbr_metadata );
262 }
263 break;
264
267 {
268 GERBER_PLOTTER* gerberPlotter = static_cast<GERBER_PLOTTER*>( m_plotter );
269
270 gerberPlotter->FlashPadChamferRoundRect( shape_pos, aPad->GetSize(),
272 aPad->GetChamferRectRatio(),
273 aPad->GetChamferPositions(),
274 aPad->GetOrientation(), aPlotMode,
275 &gbr_metadata );
276 break;
277 }
278
280
281 default:
283 {
284 const std::shared_ptr<SHAPE_POLY_SET>& polygons = aPad->GetEffectivePolygon();
285
286 if( polygons->OutlineCount() )
287 {
288 m_plotter->FlashPadCustom( shape_pos, aPad->GetSize(), aPad->GetOrientation(),
289 polygons.get(), aPlotMode, &gbr_metadata );
290 }
291 }
292 break;
293 }
294}
@ GBR_APERTURE_ATTRIB_BGAPAD_CUDEF
aperture used for edge connector pad (outer layers).
Definition: gbr_metadata.h:117
@ GBR_APERTURE_ATTRIB_HEATSINKPAD
aperture used for castellated pads in copper layer files.
Definition: gbr_metadata.h:131
@ GBR_APERTURE_ATTRIB_TESTPOINT
aperture used for test point pad (outer layers).
Definition: gbr_metadata.h:122
@ GBR_APERTURE_ATTRIB_SMDPAD_CUDEF
aperture used for BGA pads with a solder mask defined by the copper shape.
Definition: gbr_metadata.h:111
@ GBR_APERTURE_ATTRIB_WASHERPAD
aperture used for mechanical pads (NPTH).
Definition: gbr_metadata.h:121
@ GBR_APERTURE_ATTRIB_COMPONENTPAD
aperture used for SMD pad. Excluded BGA pads which have their own type.
Definition: gbr_metadata.h:105
@ GBR_APERTURE_ATTRIB_FIDUCIAL_GLBL
aperture used for fiducial pad (outer layers), at footprint level.
Definition: gbr_metadata.h:125
@ GBR_APERTURE_ATTRIB_CASTELLATEDPAD
aperture used for castellated pads in drill files.
Definition: gbr_metadata.h:134
@ GBR_APERTURE_ATTRIB_FIDUCIAL_LOCAL
aperture used for heat sink pad (typically for SMDs).
Definition: gbr_metadata.h:128
void SetPadPinFunction(const wxString &aPadPinFunction, bool aUseUTF8, bool aEscapeString)
Definition: gbr_metadata.h:236
GBR_NETLIST_METADATA m_NetlistMetadata
An item to handle object attribute.
Definition: gbr_metadata.h:262
void SetPadName(const wxString &aPadname, bool aUseUTF8=false, bool aEscapeString=false)
Definition: gbr_metadata.h:231
bool m_NotInNet
true if a pad of a footprint cannot be connected (for instance a mechanical NPTH, ot a not named pad)...
void FlashPadChamferRoundRect(const VECTOR2I &aShapePos, const VECTOR2I &aPadSize, int aCornerRadius, double aChamferRatio, int aChamferPositions, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aPlotMode, void *aData)
Flash a chamfered round rect pad.
static LSET ExternalCuMask()
Return a mask holding the Front and Bottom layers.
Definition: lset.cpp:801
PAD_PROP GetProperty() const
Definition: pad.h:403
PAD_ATTRIB GetAttribute() const
Definition: pad.h:400
const wxString & GetPinFunction() const
Definition: pad.h:146
const wxString & GetNumber() const
Definition: pad.h:135
int GetRoundRectCornerRadius() const
Definition: pad.cpp:330
VECTOR2I ShapePos() const
Definition: pad.cpp:770
FOOTPRINT * GetParent() const
Definition: pad.cpp:1471
const VECTOR2I & GetDelta() const
Definition: pad.h:264
PAD_SHAPE GetShape() const
Definition: pad.h:194
EDA_ANGLE GetOrientation() const
Return the rotation angle of the pad.
Definition: pad.h:370
const std::shared_ptr< SHAPE_POLY_SET > & GetEffectivePolygon() const
Definition: pad.cpp:361
int GetChamferPositions() const
Definition: pad.h:594
const VECTOR2I & GetSize() const
Definition: pad.h:257
double GetChamferRectRatio() const
Definition: pad.h:584
int GetSketchPadLineWidth() const
virtual void FlashPadCustom(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, SHAPE_POLY_SET *aPolygons, OUTLINE_MODE aTraceMode, void *aData)=0
virtual void FlashPadTrapez(const VECTOR2I &aPadPos, const VECTOR2I *aCorners, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
Flash a trapezoidal pad.
virtual void FlashPadRoundRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, int aCornerRadius, const EDA_ANGLE &aOrient, OUTLINE_MODE aTraceMode, void *aData)=0
virtual void FlashPadRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
#define GBR_NETINFO_ALL
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
Definition: macros.h:83
@ NPTH
like PAD_PTH, but not plated
@ SMD
Smd pad, appears on the solder paste layer (default)
@ PTH
Plated through hole pad.
@ CONN
Like smd, does not appear on the solder paste layer (default)
@ FIDUCIAL_LOCAL
a fiducial (usually a smd) local to the parent footprint
@ FIDUCIAL_GLBL
a fiducial (usually a smd) for the full board
@ HEATSINK
a pad used as heat sink, usually in SMD footprints
@ NONE
no special fabrication property
@ TESTPOINT
a test point pad
@ CASTELLATED
a pad with a castellated through hole
@ BGA
Smd pad, used in BGA footprints.

References LSET::AllCuMask(), BGA, CASTELLATED, CHAMFERED_RECT, CIRCLE, CONN, CUSTOM, LSET::ExternalCuMask(), FIDUCIAL_GLBL, FIDUCIAL_LOCAL, GERBER_PLOTTER::FlashPadChamferRoundRect(), PLOTTER::FlashPadCircle(), PLOTTER::FlashPadCustom(), PLOTTER::FlashPadOval(), PLOTTER::FlashPadRect(), PLOTTER::FlashPadRoundRect(), PLOTTER::FlashPadTrapez(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_BGAPAD_CUDEF, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CASTELLATEDPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_COMPONENTPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONDUCTOR, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_CONNECTORPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_FIDUCIAL_GLBL, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_FIDUCIAL_LOCAL, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_HEATSINKPAD, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_SMDPAD_CUDEF, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_TESTPOINT, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_WASHERPAD, GBR_NETINFO_ALL, GBR_NETLIST_METADATA::GBR_NETINFO_CMP, GBR_NETLIST_METADATA::GBR_NETINFO_NET, GERBER, PAD::GetAttribute(), PAD::GetChamferPositions(), PAD::GetChamferRectRatio(), PAD::GetDelta(), PAD::GetEffectivePolygon(), BOARD_CONNECTED_ITEM::GetNetname(), PAD::GetNumber(), PAD::GetOrientation(), PAD::GetParent(), PAD::GetPinFunction(), PLOTTER::GetPlotterType(), PAD::GetProperty(), FOOTPRINT::GetReference(), PAD::GetRoundRectCornerRadius(), PAD::GetShape(), PAD::GetSize(), PCB_PLOT_PARAMS::GetSketchPadLineWidth(), HEATSINK, KI_FALLTHROUGH, LIGHTGRAY, m_layerMask, GBR_METADATA::m_NetlistMetadata, GBR_NETLIST_METADATA::m_NotInNet, m_plotter, NONE, NPTH, OVAL, PTH, RECT, ROUNDRECT, GBR_METADATA::SetApertureAttrib(), GBR_METADATA::SetCmpReference(), PLOTTER::SetColor(), GBR_METADATA::SetCopper(), PLOTTER::SetCurrentLineWidth(), GBR_METADATA::SetNetAttribType(), GBR_METADATA::SetNetName(), GBR_METADATA::SetPadName(), GBR_METADATA::SetPadPinFunction(), PAD::ShapePos(), SKETCH, SMD, TESTPOINT, TRAPEZOID, WHITE, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PlotStandardLayer().

◆ PlotPcbGraphicItem()

void BRDITEMS_PLOTTER::PlotPcbGraphicItem ( const BOARD_ITEM item)

Definition at line 347 of file plot_brditems_plotter.cpp.

348{
349 switch( item->Type() )
350 {
351 case PCB_SHAPE_T:
352 PlotPcbShape( static_cast<const PCB_SHAPE*>( item ) );
353 break;
354
355 case PCB_TEXT_T:
356 {
357 const PCB_TEXT* text = static_cast<const PCB_TEXT*>( item );
358 PlotPcbText( text, text->GetLayer(), text->IsKnockout() );
359 break;
360 }
361
362 case PCB_TEXTBOX_T:
363 {
364 const PCB_TEXTBOX* textbox = static_cast<const PCB_TEXTBOX*>( item );
365 PlotPcbText( textbox, textbox->GetLayer(), textbox->IsKnockout() );
366 PlotPcbShape( textbox );
367 break;
368 }
369
371 case PCB_DIM_CENTER_T:
372 case PCB_DIM_RADIAL_T:
374 case PCB_DIM_LEADER_T:
375 PlotDimension( static_cast<const PCB_DIMENSION_BASE*>( item ) );
376 break;
377
378 case PCB_TARGET_T:
379 PlotPcbTarget( static_cast<const PCB_TARGET*>( item ) );
380 break;
381
382 default:
383 break;
384 }
385}
void PlotPcbTarget(const PCB_TARGET *aMire)
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition: typeinfo.h:88
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
Definition: typeinfo.h:110
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
Definition: typeinfo.h:107
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
Definition: typeinfo.h:108
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
Definition: typeinfo.h:91
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition: typeinfo.h:90
@ PCB_TARGET_T
class PCB_TARGET, a target (graphic item)
Definition: typeinfo.h:111
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
Definition: typeinfo.h:106
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
Definition: typeinfo.h:109

References BOARD_ITEM::GetLayer(), BOARD_ITEM::IsKnockout(), PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_SHAPE_T, PCB_TARGET_T, PCB_TEXT_T, PCB_TEXTBOX_T, PlotDimension(), PlotPcbShape(), PlotPcbTarget(), PlotPcbText(), text, and EDA_ITEM::Type().

Referenced by PlotBoardGraphicItems(), and PlotSolderMaskLayer().

◆ PlotPcbShape()

void BRDITEMS_PLOTTER::PlotPcbShape ( const PCB_SHAPE aShape)

Definition at line 947 of file plot_brditems_plotter.cpp.

948{
949 if( !m_layerMask[aShape->GetLayer()] )
950 return;
951
952 bool sketch = GetPlotMode() == SKETCH;
953 int thickness = aShape->GetWidth();
954 PLOT_DASH_TYPE lineStyle = aShape->GetStroke().GetPlotStyle();
955
956 m_plotter->SetColor( getColor( aShape->GetLayer() ) );
957
958 GBR_METADATA gbr_metadata;
959
960 if( aShape->GetLayer() == Edge_Cuts )
962
963 if( IsCopperLayer( aShape->GetLayer() ) )
964 // Graphic items (PCB_SHAPE, TEXT) having no net have the NonConductor attribute
965 // Graphic items having a net have the Conductor attribute, but are not (yet?)
966 // supported in Pcbnew
968
969 if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
970 {
971 switch( aShape->GetShape() )
972 {
973 case SHAPE_T::SEGMENT:
974 m_plotter->ThickSegment( aShape->GetStart(), aShape->GetEnd(), thickness, GetPlotMode(),
975 &gbr_metadata );
976 break;
977
978 case SHAPE_T::CIRCLE:
979 if( aShape->IsFilled() )
980 {
981 m_plotter->FilledCircle( aShape->GetStart(), aShape->GetRadius() * 2 + thickness,
982 GetPlotMode(), &gbr_metadata );
983 }
984 else
985 {
986 m_plotter->ThickCircle( aShape->GetStart(), aShape->GetRadius() * 2, thickness,
987 GetPlotMode(), &gbr_metadata );
988 }
989
990 break;
991
992 case SHAPE_T::ARC:
993 {
994 // when startAngle == endAngle ThickArc() doesn't know whether it's 0 deg and 360 deg
995 // but it is a circle
996 if( std::abs( aShape->GetArcAngle().AsDegrees() ) == 360.0 )
997 {
998 m_plotter->ThickCircle( aShape->GetCenter(), aShape->GetRadius() * 2, thickness,
999 GetPlotMode(), &gbr_metadata );
1000 }
1001 else
1002 {
1003 m_plotter->ThickArc( *aShape, GetPlotMode(), &gbr_metadata );
1004 }
1005
1006 break;
1007 }
1008
1009 case SHAPE_T::BEZIER:
1010 m_plotter->BezierCurve( aShape->GetStart(), aShape->GetBezierC1(),
1011 aShape->GetBezierC2(), aShape->GetEnd(), 0, thickness );
1012 break;
1013
1014 case SHAPE_T::POLY:
1015 if( aShape->IsPolyShapeValid() )
1016 {
1017 if( sketch )
1018 {
1019 for( auto it = aShape->GetPolyShape().CIterateSegments( 0 ); it; it++ )
1020 {
1021 auto seg = it.Get();
1022 m_plotter->ThickSegment( seg.A, seg.B, thickness, GetPlotMode(),
1023 &gbr_metadata );
1024 }
1025 }
1026 else
1027 {
1028 m_plotter->SetCurrentLineWidth( thickness, &gbr_metadata );
1029
1030 // Draw the polygon: only one polygon is expected
1031 // However we provide a multi polygon shape drawing
1032 // ( for the future or to show a non expected shape )
1033 // This must be simplified and fractured to prevent overlapping polygons
1034 // from generating invalid Gerber files
1038
1039 for( int jj = 0; jj < tmpPoly.OutlineCount(); ++jj )
1040 {
1041 SHAPE_LINE_CHAIN& poly = tmpPoly.Outline( jj );
1042
1043 // Ensure the polygon is closed:
1044 poly.SetClosed( true );
1045
1046 m_plotter->PlotPoly( poly, fill, thickness, &gbr_metadata );
1047 }
1048 }
1049 }
1050
1051 break;
1052
1053 case SHAPE_T::RECT:
1054 {
1055 std::vector<VECTOR2I> pts = aShape->GetRectCorners();
1056
1057 if( sketch || thickness > 0 )
1058 {
1059 m_plotter->ThickSegment( pts[0], pts[1], thickness, GetPlotMode(), &gbr_metadata );
1060 m_plotter->ThickSegment( pts[1], pts[2], thickness, GetPlotMode(), &gbr_metadata );
1061 m_plotter->ThickSegment( pts[2], pts[3], thickness, GetPlotMode(), &gbr_metadata );
1062 m_plotter->ThickSegment( pts[3], pts[0], thickness, GetPlotMode(), &gbr_metadata );
1063 }
1064
1065 if( !sketch && aShape->IsFilled() )
1066 {
1067 SHAPE_LINE_CHAIN poly;
1068
1069 for( const VECTOR2I& pt : pts )
1070 poly.Append( pt );
1071
1072 m_plotter->PlotPoly( poly, FILL_T::FILLED_SHAPE, -1, &gbr_metadata );
1073 }
1074
1075 break;
1076 }
1077
1078 default:
1080 }
1081 }
1082 else
1083 {
1084 std::vector<SHAPE*> shapes = aShape->MakeEffectiveShapes( true );
1085
1086 for( SHAPE* shape : shapes )
1087 {
1088 STROKE_PARAMS::Stroke( shape, lineStyle, thickness, m_plotter->RenderSettings(),
1089 [&]( const VECTOR2I& a, const VECTOR2I& b )
1090 {
1091 m_plotter->ThickSegment( a, b, thickness, GetPlotMode(),
1092 &gbr_metadata );
1093 } );
1094 }
1095
1096 for( SHAPE* shape : shapes )
1097 delete shape;
1098 }
1099}
SHAPE_POLY_SET & GetPolyShape()
Definition: eda_shape.h:247
int GetRadius() const
Definition: eda_shape.cpp:523
wxString SHAPE_T_asString() const
Definition: eda_shape.cpp:75
void SetClosed(bool aClosed)
Mark the line chain as closed (i.e.
CONST_SEGMENT_ITERATOR CIterateSegments(int aFirst, int aLast, bool aIterateHoles=false) const
Return an iterator object, for iterating aPolygonIdx-th polygon edges.
SHAPE_POLY_SET CloneDropTriangulation() const
Creates a new empty polygon in the set and returns its index.
FILL_T
Definition: eda_shape.h:54

References std::abs(), SHAPE_LINE_CHAIN::Append(), ARC, EDA_ANGLE::AsDegrees(), BEZIER, PLOTTER::BezierCurve(), CIRCLE, SHAPE_POLY_SET::CIterateSegments(), SHAPE_POLY_SET::CloneDropTriangulation(), Edge_Cuts, FILLED_SHAPE, PLOTTER::FilledCircle(), FIRST_TYPE, SHAPE_POLY_SET::Fracture(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_EDGECUT, GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR, EDA_SHAPE::GetArcAngle(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), PCB_SHAPE::GetCenter(), getColor(), EDA_SHAPE::GetEnd(), BOARD_ITEM::GetLayer(), PCB_PLOT_PARAMS::GetPlotMode(), STROKE_PARAMS::GetPlotStyle(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetRectCorners(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), PCB_SHAPE::GetStroke(), EDA_SHAPE::GetWidth(), IsCopperLayer(), EDA_SHAPE::IsFilled(), EDA_SHAPE::IsPolyShapeValid(), m_layerMask, m_plotter, EDA_SHAPE::MakeEffectiveShapes(), NO_FILL, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PLOTTER::PlotPoly(), SHAPE_POLY_SET::PM_FAST, POLY, RECT, PLOTTER::RenderSettings(), SEGMENT, GBR_METADATA::SetApertureAttrib(), SHAPE_LINE_CHAIN::SetClosed(), PLOTTER::SetColor(), PLOTTER::SetCurrentLineWidth(), EDA_SHAPE::SHAPE_T_asString(), SKETCH, STROKE_PARAMS::Stroke(), PLOTTER::ThickArc(), PLOTTER::ThickCircle(), PLOTTER::ThickSegment(), and UNIMPLEMENTED_FOR.

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), PlotDimension(), PlotPcbGraphicItem(), and PlotPcbTarget().

◆ PlotPcbTarget()

void BRDITEMS_PLOTTER::PlotPcbTarget ( const PCB_TARGET aMire)

Definition at line 499 of file plot_brditems_plotter.cpp.

500{
501 int dx1, dx2, dy1, dy2, radius;
502
503 if( !m_layerMask[aMire->GetLayer()] )
504 return;
505
506 m_plotter->SetColor( getColor( aMire->GetLayer() ) );
507
508 PCB_SHAPE draw;
509
511 draw.SetFilled( false );
513 draw.SetLayer( aMire->GetLayer() );
514 draw.SetStart( aMire->GetPosition() );
515 radius = aMire->GetSize() / 3;
516
517 if( aMire->GetShape() ) // shape X
518 radius = aMire->GetSize() / 2;
519
520 // Draw the circle
521 draw.SetEnd( VECTOR2I( draw.GetStart().x + radius, draw.GetStart().y ) );
522
523 PlotPcbShape( &draw );
524
526
527 radius = aMire->GetSize() / 2;
528 dx1 = radius;
529 dy1 = 0;
530 dx2 = 0;
531 dy2 = radius;
532
533 if( aMire->GetShape() ) // Shape X
534 {
535 dx1 = dy1 = radius;
536 dx2 = dx1;
537 dy2 = -dy1;
538 }
539
540 VECTOR2I mirePos( aMire->GetPosition() );
541
542 // Draw the X or + shape:
543 draw.SetStart( VECTOR2I( mirePos.x - dx1, mirePos.y - dy1 ) );
544 draw.SetEnd( VECTOR2I( mirePos.x + dx1, mirePos.y + dy1 ) );
545 PlotPcbShape( &draw );
546
547 draw.SetStart( VECTOR2I( mirePos.x - dx2, mirePos.y - dy2 ) );
548 draw.SetEnd( VECTOR2I( mirePos.x + dx2, mirePos.y + dy2 ) );
549 PlotPcbShape( &draw );
550}
int GetShape() const
Definition: pcb_target.h:58
int GetWidth() const
Definition: pcb_target.h:64
int GetSize() const
Definition: pcb_target.h:61
VECTOR2I GetPosition() const override
Definition: pcb_target.h:55

References CIRCLE, getColor(), BOARD_ITEM::GetLayer(), PCB_TARGET::GetPosition(), PCB_TARGET::GetShape(), PCB_TARGET::GetSize(), EDA_SHAPE::GetStart(), PCB_TARGET::GetWidth(), m_layerMask, m_plotter, PlotPcbShape(), SEGMENT, PLOTTER::SetColor(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFilled(), BOARD_ITEM::SetLayer(), EDA_SHAPE::SetShape(), EDA_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), SOLID, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PlotPcbGraphicItem().

◆ PlotPcbText()

void BRDITEMS_PLOTTER::PlotPcbText ( const EDA_TEXT aText,
PCB_LAYER_ID  aLayer,
bool  aIsKnockout 
)

Definition at line 790 of file plot_brditems_plotter.cpp.

791{
792 KIFONT::FONT* font = aText->GetFont();
793
794 if( !font )
795 {
798 : wxString( wxEmptyString ),
799 aText->IsBold(), aText->IsItalic() );
800 }
801
802 wxString shownText( aText->GetShownText() );
803 TEXT_ATTRIBUTES attrs = aText->GetAttributes();
804
805 if( shownText.IsEmpty() )
806 return;
807
808 if( !m_layerMask[aLayer] )
809 return;
810
811 GBR_METADATA gbr_metadata;
812
813 if( IsCopperLayer( aLayer ) )
815
816 COLOR4D color = getColor( aLayer );
818
819 VECTOR2I size = aText->GetTextSize();
820 VECTOR2I pos = aText->GetTextPos();
821
823
824 if( aText->IsMirrored() )
825 size.x = -size.x;
826
828
829 if( aIsKnockout )
830 {
832 SHAPE_POLY_SET knockouts;
833
834 CALLBACK_GAL callback_gal( empty_opts,
835 // Polygon callback
836 [&]( const SHAPE_LINE_CHAIN& aPoly )
837 {
838 knockouts.AddOutline( aPoly );
839 } );
840
841 callback_gal.SetIsFill( font->IsOutline() );
842 callback_gal.SetIsStroke( font->IsStroke() );
843 font->Draw( &callback_gal, shownText, aText->GetDrawPos(), attrs );
844
845 SHAPE_POLY_SET finalPoly;
846 int margin = attrs.m_StrokeWidth * 1.5
848
849 aText->TransformBoundingBoxToPolygon( &finalPoly, margin );
850 finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST );
852
853 for( int ii = 0; ii < finalPoly.OutlineCount(); ++ii )
854 m_plotter->PlotPoly( finalPoly.Outline( ii ), FILL_T::FILLED_SHAPE, 0, &gbr_metadata );
855 }
856 else if( aText->IsMultilineAllowed() )
857 {
858 std::vector<VECTOR2I> positions;
859 wxArrayString strings_list;
860 wxStringSplit( shownText, strings_list, '\n' );
861 positions.reserve( strings_list.Count() );
862
863 aText->GetLinePositions( positions, strings_list.Count() );
864
865 for( unsigned ii = 0; ii < strings_list.Count(); ii++ )
866 {
867 wxString& txt = strings_list.Item( ii );
868 m_plotter->Text( positions[ii], color, txt, aText->GetDrawRotation(), size,
869 attrs.m_Halign, attrs.m_Valign, attrs.m_StrokeWidth, attrs.m_Italic,
870 attrs.m_Bold, false, font, &gbr_metadata );
871 }
872 }
873 else
874 {
875 m_plotter->Text( pos, color, shownText, aText->GetDrawRotation(), size, attrs.m_Halign,
876 attrs.m_Valign, attrs.m_StrokeWidth, attrs.m_Italic, attrs.m_Bold, false,
877 font, &gbr_metadata );
878 }
879}
void TransformBoundingBoxToPolygon(SHAPE_POLY_SET *aBuffer, int aClearance) const
Convert the text bounding box to a rectangular polygon depending on the text orientation,...
Definition: eda_text.cpp:945
bool IsMultilineAllowed() const
Definition: eda_text.h:146
virtual EDA_ANGLE GetDrawRotation() const
Definition: eda_text.h:317
virtual VECTOR2I GetDrawPos() const
Definition: eda_text.h:318
void GetLinePositions(std::vector< VECTOR2I > &aPositions, int aLineCount) const
Populate aPositions with the position of each line of a multiline text, according to the vertical jus...
Definition: eda_text.cpp:671
const TEXT_ATTRIBUTES & GetAttributes() const
Definition: eda_text.h:172
virtual wxString GetShownText(int aDepth=0, bool aAllowExtraText=true) const
Return the string actually shown after processing of the base text.
Definition: eda_text.h:98
void Draw(KIGFX::GAL *aGal, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aCursor, const TEXT_ATTRIBUTES &aAttrs) const
Draw a string.
Definition: font.cpp:159
virtual bool IsStroke() const
Definition: font.h:112
virtual bool IsOutline() const
Definition: font.h:113
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
void BooleanSubtract(const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode)
Perform boolean polyset intersection For aFastMode meaning, see function booleanOp.
GR_TEXT_H_ALIGN_T m_Halign
GR_TEXT_V_ALIGN_T m_Valign
int GetKnockoutTextMargin(const VECTOR2I &aSize, int aThickness)
Returns the margin for knocking out text.
Definition: gr_text.h:97
void wxStringSplit(const wxString &aText, wxArrayString &aStrings, wxChar aSplitter)
Split aString to a string list separated at aSplitter.

References SHAPE_POLY_SET::AddOutline(), SHAPE_POLY_SET::BooleanSubtract(), color, KIFONT::FONT::Draw(), FILLED_SHAPE, SHAPE_POLY_SET::Fracture(), GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR, EDA_TEXT::GetAttributes(), getColor(), KIGFX::RENDER_SETTINGS::GetDefaultFont(), EDA_TEXT::GetDrawPos(), EDA_TEXT::GetDrawRotation(), EDA_TEXT::GetEffectiveTextPenWidth(), EDA_TEXT::GetFont(), KIFONT::FONT::GetFont(), GetKnockoutTextMargin(), EDA_TEXT::GetLinePositions(), EDA_TEXT::GetShownText(), EDA_TEXT::GetTextPos(), EDA_TEXT::GetTextSize(), EDA_TEXT::IsBold(), IsCopperLayer(), EDA_TEXT::IsItalic(), EDA_TEXT::IsMirrored(), EDA_TEXT::IsMultilineAllowed(), KIFONT::FONT::IsOutline(), KIFONT::FONT::IsStroke(), TEXT_ATTRIBUTES::m_Bold, TEXT_ATTRIBUTES::m_Halign, TEXT_ATTRIBUTES::m_Italic, m_layerMask, m_plotter, TEXT_ATTRIBUTES::m_Size, TEXT_ATTRIBUTES::m_StrokeWidth, TEXT_ATTRIBUTES::m_Valign, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PLOTTER::PlotPoly(), SHAPE_POLY_SET::PM_FAST, PLOTTER::RenderSettings(), GBR_METADATA::SetApertureAttrib(), PLOTTER::SetColor(), PLOTTER::SetCurrentLineWidth(), KIGFX::GAL::SetIsFill(), PLOTTER::Text(), EDA_TEXT::TransformBoundingBoxToPolygon(), wxStringSplit(), and VECTOR2< T >::x.

Referenced by PlotDimension(), PlotFootprintGraphicItems(), and PlotPcbGraphicItem().

◆ SetA4Output()

void PCB_PLOT_PARAMS::SetA4Output ( int  aForce)
inlineinherited

Definition at line 177 of file pcb_plot_params.h.

177{ m_A4Output = aForce; }

References PCB_PLOT_PARAMS::m_A4Output.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetAutoScale()

void PCB_PLOT_PARAMS::SetAutoScale ( bool  aFlag)
inlineinherited

Definition at line 93 of file pcb_plot_params.h.

93{ m_autoScale = aFlag; }

References PCB_PLOT_PARAMS::m_autoScale.

Referenced by DIALOG_PLOT::Plot().

◆ SetBlackAndWhite()

void PCB_PLOT_PARAMS::SetBlackAndWhite ( bool  blackAndWhite)
inlineinherited

Definition at line 147 of file pcb_plot_params.h.

147{ m_blackAndWhite = blackAndWhite; }

References PCB_PLOT_PARAMS::m_blackAndWhite.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetColorSettings()

void PCB_PLOT_PARAMS::SetColorSettings ( COLOR_SETTINGS aSettings)
inlineinherited

Definition at line 57 of file pcb_plot_params.h.

57{ m_colors = aSettings; }

References PCB_PLOT_PARAMS::m_colors.

Referenced by PCB_PLOT_SVG::Plot(), and DIALOG_PLOT::Plot().

◆ SetCreateGerberJobFile()

void PCB_PLOT_PARAMS::SetCreateGerberJobFile ( bool  aCreate)
inlineinherited

Definition at line 135 of file pcb_plot_params.h.

135{ m_createGerberJobFile = aCreate; }

References PCB_PLOT_PARAMS::m_createGerberJobFile.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetDashedLineDashRatio()

void PCB_PLOT_PARAMS::SetDashedLineDashRatio ( double  aVal)
inlineinherited

Definition at line 192 of file pcb_plot_params.h.

192{ m_dashedLineDashRatio = aVal; }

References PCB_PLOT_PARAMS::m_dashedLineDashRatio.

◆ SetDashedLineGapRatio()

void PCB_PLOT_PARAMS::SetDashedLineGapRatio ( double  aVal)
inlineinherited

Definition at line 195 of file pcb_plot_params.h.

195{ m_dashedLineGapRatio = aVal; }

References PCB_PLOT_PARAMS::m_dashedLineGapRatio.

◆ SetDisableGerberMacros()

void PCB_PLOT_PARAMS::SetDisableGerberMacros ( bool  aDisable)
inlineinherited

◆ SetDrillMarksType()

void PCB_PLOT_PARAMS::SetDrillMarksType ( DRILL_MARKS  aVal)
inlineinherited

◆ SetDXFPlotPolygonMode()

void PCB_PLOT_PARAMS::SetDXFPlotPolygonMode ( bool  aFlag)
inlineinherited

◆ SetDXFPlotUnits()

void PCB_PLOT_PARAMS::SetDXFPlotUnits ( DXF_UNITS  aUnit)
inlineinherited

◆ SetFineScaleAdjustX()

void PCB_PLOT_PARAMS::SetFineScaleAdjustX ( double  aVal)
inlineinherited

Definition at line 86 of file pcb_plot_params.h.

86{ m_fineScaleAdjustX = aVal; }

References PCB_PLOT_PARAMS::m_fineScaleAdjustX.

Referenced by DIALOG_PLOT::Plot().

◆ SetFineScaleAdjustY()

void PCB_PLOT_PARAMS::SetFineScaleAdjustY ( double  aVal)
inlineinherited

Definition at line 88 of file pcb_plot_params.h.

88{ m_fineScaleAdjustY = aVal; }

References PCB_PLOT_PARAMS::m_fineScaleAdjustY.

Referenced by DIALOG_PLOT::Plot().

◆ SetFormat()

◆ SetGerberPrecision()

void PCB_PLOT_PARAMS::SetGerberPrecision ( int  aPrecision)
inherited

Definition at line 149 of file pcb_plot_params.cpp.

150{
151 // Currently Gerber files use mm.
152 // accepted precision is only 6 (max value, this is the resolution of Pcbnew)
153 // or 5, min value for professional boards, when 6 creates problems
154 // to board makers.
155
158}

References gbrDefaultPrecision, and PCB_PLOT_PARAMS::m_gerberPrecision.

Referenced by DIALOG_PLOT::applyPlotSettings(), and PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob().

◆ SetHPGLPenDiameter()

bool PCB_PLOT_PARAMS::SetHPGLPenDiameter ( double  aValue)
inherited

Definition at line 379 of file pcb_plot_params.cpp.

380{
382}
static bool setDouble(double *aTarget, double aValue, double aMin, double aMax)
#define HPGL_PEN_DIAMETER_MIN
#define HPGL_PEN_DIAMETER_MAX

References HPGL_PEN_DIAMETER_MAX, HPGL_PEN_DIAMETER_MIN, PCB_PLOT_PARAMS::m_HPGLPenDiam, and setDouble().

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetHPGLPenNum()

void PCB_PLOT_PARAMS::SetHPGLPenNum ( int  aVal)
inlineinherited

Definition at line 189 of file pcb_plot_params.h.

189{ m_HPGLPenNum = aVal; }

References PCB_PLOT_PARAMS::m_HPGLPenNum.

◆ SetHPGLPenSpeed()

bool PCB_PLOT_PARAMS::SetHPGLPenSpeed ( int  aValue)
inherited

Definition at line 385 of file pcb_plot_params.cpp.

386{
388}
#define HPGL_PEN_SPEED_MAX
static bool setInt(int *aTarget, int aValue, int aMin, int aMax)
#define HPGL_PEN_SPEED_MIN

References HPGL_PEN_SPEED_MAX, HPGL_PEN_SPEED_MIN, PCB_PLOT_PARAMS::m_HPGLPenSpeed, and setInt().

◆ SetIncludeGerberNetlistInfo()

void PCB_PLOT_PARAMS::SetIncludeGerberNetlistInfo ( bool  aUse)
inlineinherited

◆ SetLayerSelection()

void PCB_PLOT_PARAMS::SetLayerSelection ( LSET  aSelection)
inlineinherited

◆ SetLayerSet()

void BRDITEMS_PLOTTER::SetLayerSet ( LSET  aLayerMask)
inline

◆ SetMirror()

void PCB_PLOT_PARAMS::SetMirror ( bool  aFlag)
inlineinherited

Definition at line 96 of file pcb_plot_params.h.

96{ m_mirror = aFlag; }

References PCB_PLOT_PARAMS::m_mirror.

Referenced by DIALOG_PLOT::applyPlotSettings(), PCB_PLOT_SVG::Plot(), and StartPlotBoard().

◆ SetNegative()

void PCB_PLOT_PARAMS::SetNegative ( bool  aFlag)
inlineinherited

Definition at line 111 of file pcb_plot_params.h.

111{ m_negative = aFlag; }

References PCB_PLOT_PARAMS::m_negative.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetOutputDirectory()

void PCB_PLOT_PARAMS::SetOutputDirectory ( const wxString &  aDir)
inlineinherited

◆ SetPlotFrameRef()

◆ SetPlotInvisibleText()

void PCB_PLOT_PARAMS::SetPlotInvisibleText ( bool  aFlag)
inlineinherited

Definition at line 104 of file pcb_plot_params.h.

104{ m_plotInvisibleText = aFlag; }

References PCB_PLOT_PARAMS::m_plotInvisibleText.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetPlotMode()

void PCB_PLOT_PARAMS::SetPlotMode ( OUTLINE_MODE  aPlotMode)
inlineinherited

Definition at line 71 of file pcb_plot_params.h.

71{ m_plotMode = aPlotMode; }

References PCB_PLOT_PARAMS::m_plotMode.

Referenced by DIALOG_PLOT::applyPlotSettings(), and PCB_PLOT_PARAMS_PARSER::Parse().

◆ SetPlotOnAllLayersSelection()

void PCB_PLOT_PARAMS::SetPlotOnAllLayersSelection ( LSET  aSelection)
inlineinherited

Definition at line 164 of file pcb_plot_params.h.

165 {
166 m_plotOnAllLayersSelection = aSelection;
167 }

References PCB_PLOT_PARAMS::m_plotOnAllLayersSelection.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetPlotReference()

void PCB_PLOT_PARAMS::SetPlotReference ( bool  aFlag)
inlineinherited

◆ SetPlotValue()

void PCB_PLOT_PARAMS::SetPlotValue ( bool  aFlag)
inlineinherited

◆ SetPlotViaOnMaskLayer()

void PCB_PLOT_PARAMS::SetPlotViaOnMaskLayer ( bool  aFlag)
inlineinherited

◆ SetScale()

void PCB_PLOT_PARAMS::SetScale ( double  aVal)
inlineinherited

Definition at line 83 of file pcb_plot_params.h.

83{ m_scale = aVal; }

References PCB_PLOT_PARAMS::m_scale.

Referenced by DIALOG_PLOT::Plot().

◆ SetScaleSelection()

void PCB_PLOT_PARAMS::SetScaleSelection ( int  aSelection)
inlineinherited

Definition at line 174 of file pcb_plot_params.h.

174{ m_scaleSelection = aSelection; }

References PCB_PLOT_PARAMS::m_scaleSelection.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetSketchPadLineWidth()

void PCB_PLOT_PARAMS::SetSketchPadLineWidth ( int  aWidth)
inlineinherited

Definition at line 101 of file pcb_plot_params.h.

101{ m_sketchPadLineWidth = aWidth; }

References PCB_PLOT_PARAMS::m_sketchPadLineWidth.

Referenced by DIALOG_PLOT::Plot().

◆ SetSketchPadsOnFabLayers()

void PCB_PLOT_PARAMS::SetSketchPadsOnFabLayers ( bool  aFlag)
inlineinherited

Definition at line 99 of file pcb_plot_params.h.

99{ m_sketchPadsOnFabLayers = aFlag; }

References PCB_PLOT_PARAMS::m_sketchPadsOnFabLayers.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetSkipPlotNPTH_Pads()

void PCB_PLOT_PARAMS::SetSkipPlotNPTH_Pads ( bool  aSkip)
inlineinherited

Definition at line 41 of file pcb_plot_params.h.

41{ m_skipNPTH_Pads = aSkip; }

References PCB_PLOT_PARAMS::m_skipNPTH_Pads.

Referenced by PCB_PLOT_SVG::Plot(), and PlotOneBoardLayer().

◆ SetSubtractMaskFromSilk()

void PCB_PLOT_PARAMS::SetSubtractMaskFromSilk ( bool  aSubtract)
inlineinherited

◆ SetSvgPrecision()

void PCB_PLOT_PARAMS::SetSvgPrecision ( unsigned  aPrecision)
inherited

Definition at line 161 of file pcb_plot_params.cpp.

162{
164}
#define SVG_PRECISION_MIN
#define SVG_PRECISION_MAX

References Clamp(), PCB_PLOT_PARAMS::m_svgPrecision, SVG_PRECISION_MAX, and SVG_PRECISION_MIN.

Referenced by DIALOG_PLOT::applyPlotSettings(), and PCB_PLOT_SVG::Plot().

◆ SetTextMode()

void PCB_PLOT_PARAMS::SetTextMode ( PLOT_TEXT_MODE  aVal)
inlineinherited

Definition at line 61 of file pcb_plot_params.h.

62 {
63 m_textMode = aVal;
64 }

References PCB_PLOT_PARAMS::m_textMode.

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ SetUseAuxOrigin()

void PCB_PLOT_PARAMS::SetUseAuxOrigin ( bool  aAux)
inlineinherited

◆ SetUseGerberProtelExtensions()

void PCB_PLOT_PARAMS::SetUseGerberProtelExtensions ( bool  aUse)
inlineinherited

◆ SetUseGerberX2format()

void PCB_PLOT_PARAMS::SetUseGerberX2format ( bool  aUse)
inlineinherited

◆ SetWidthAdjust()

void PCB_PLOT_PARAMS::SetWidthAdjust ( int  aVal)
inlineinherited

Definition at line 90 of file pcb_plot_params.h.

90{ m_widthAdjust = aVal; }

References PCB_PLOT_PARAMS::m_widthAdjust.

Referenced by DIALOG_PLOT::Plot().

Member Data Documentation

◆ m_A4Output

bool PCB_PLOT_PARAMS::m_A4Output
privateinherited

◆ m_autoScale

bool PCB_PLOT_PARAMS::m_autoScale
privateinherited

When true set the scale to fit the board in the page.

Definition at line 234 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::GetAutoScale(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetAutoScale().

◆ m_blackAndWhite

bool PCB_PLOT_PARAMS::m_blackAndWhite
privateinherited

◆ m_board

BOARD* BRDITEMS_PLOTTER::m_board
private

Definition at line 141 of file pcbplot.h.

Referenced by BRDITEMS_PLOTTER(), PlotBoardGraphicItems(), and PlotDrillMarks().

◆ m_colors

COLOR_SETTINGS* PCB_PLOT_PARAMS::m_colors
privateinherited

Pointer to active color settings to be used for plotting.

Definition at line 343 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::ColorSettings(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetColorSettings().

◆ m_createGerberJobFile

bool PCB_PLOT_PARAMS::m_createGerberJobFile
privateinherited

◆ m_dashedLineDashRatio

◆ m_dashedLineGapRatio

◆ m_default_colors

std::shared_ptr<COLOR_SETTINGS> PCB_PLOT_PARAMS::m_default_colors
privateinherited

Dummy colors object that can be created if there is no Pgm context.

Definition at line 346 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::PCB_PLOT_PARAMS().

◆ m_drillMarks

DRILL_MARKS PCB_PLOT_PARAMS::m_drillMarks
privateinherited

◆ m_DXFplotPolygonMode

bool PCB_PLOT_PARAMS::m_DXFplotPolygonMode
privateinherited

DXF format: Plot items in outline (polygon) mode.

In polygon mode, each item to plot is converted to a polygon and all polygons are merged.

Definition at line 217 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::Format(), PCB_PLOT_PARAMS::GetDXFPlotPolygonMode(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetDXFPlotPolygonMode().

◆ m_DXFplotUnits

DXF_UNITS PCB_PLOT_PARAMS::m_DXFplotUnits
privateinherited

◆ m_fineScaleAdjustX

double PCB_PLOT_PARAMS::m_fineScaleAdjustX
privateinherited

◆ m_fineScaleAdjustY

double PCB_PLOT_PARAMS::m_fineScaleAdjustY
privateinherited

◆ m_format

PLOT_FORMAT PCB_PLOT_PARAMS::m_format
privateinherited

◆ m_gerberDisableApertMacros

bool PCB_PLOT_PARAMS::m_gerberDisableApertMacros
privateinherited

Disable aperture macros in Gerber format (only for broken Gerber readers) Ideally, should be never selected.

Definition at line 268 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::Format(), PCB_PLOT_PARAMS::GetDisableGerberMacros(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetDisableGerberMacros().

◆ m_gerberPrecision

int PCB_PLOT_PARAMS::m_gerberPrecision
privateinherited

precision of coordinates in Gerber files: accepted 5 or 6 when units are in mm (6 or 7 in inches, but Pcbnew uses mm).

6 is the internal resolution of Pcbnew, but not always accepted by board maker 5 is the minimal value for professional boards.

Definition at line 280 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::Format(), PCB_PLOT_PARAMS::GetGerberPrecision(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetGerberPrecision().

◆ m_HPGLPenDiam

double PCB_PLOT_PARAMS::m_HPGLPenDiam
privateinherited

HPGL only: pen diameter in MILS, useful to fill areas However, it is in mm in hpgl files.

Definition at line 336 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::Format(), PCB_PLOT_PARAMS::GetHPGLPenDiameter(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetHPGLPenDiameter().

◆ m_HPGLPenNum

int PCB_PLOT_PARAMS::m_HPGLPenNum
privateinherited

◆ m_HPGLPenSpeed

int PCB_PLOT_PARAMS::m_HPGLPenSpeed
privateinherited

◆ m_includeGerberNetlistInfo

bool PCB_PLOT_PARAMS::m_includeGerberNetlistInfo
privateinherited

◆ m_layerMask

◆ m_layerSelection

◆ m_mirror

bool PCB_PLOT_PARAMS::m_mirror
privateinherited

◆ m_negative

bool PCB_PLOT_PARAMS::m_negative
privateinherited

◆ m_outputDirectory

wxString PCB_PLOT_PARAMS::m_outputDirectory
privateinherited

◆ m_plotFrameRef

bool PCB_PLOT_PARAMS::m_plotFrameRef
privateinherited

◆ m_plotInvisibleText

bool PCB_PLOT_PARAMS::m_plotInvisibleText
privateinherited

◆ m_plotMode

OUTLINE_MODE PCB_PLOT_PARAMS::m_plotMode
privateinherited

FILLED or SKETCH selects how to plot filled objects.

FILLED or SKETCH not available with all drivers: some have fixed mode

Definition at line 210 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::GetPlotMode(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetPlotMode().

◆ m_plotOnAllLayersSelection

LSET PCB_PLOT_PARAMS::m_plotOnAllLayersSelection
privateinherited

◆ m_plotReference

bool PCB_PLOT_PARAMS::m_plotReference
privateinherited

◆ m_plotter

◆ m_plotValue

bool PCB_PLOT_PARAMS::m_plotValue
privateinherited

◆ m_plotViaOnMaskLayer

bool PCB_PLOT_PARAMS::m_plotViaOnMaskLayer
privateinherited

◆ m_scale

double PCB_PLOT_PARAMS::m_scale
privateinherited

Global scale factor, 1.0 plots a board with its actual size.

Definition at line 237 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::GetScale(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetScale().

◆ m_scaleSelection

int PCB_PLOT_PARAMS::m_scaleSelection
privateinherited

◆ m_sketchPadLineWidth

int PCB_PLOT_PARAMS::m_sketchPadLineWidth
privateinherited

◆ m_sketchPadsOnFabLayers

bool PCB_PLOT_PARAMS::m_sketchPadsOnFabLayers
privateinherited

◆ m_skipNPTH_Pads

bool PCB_PLOT_PARAMS::m_skipNPTH_Pads
privateinherited

◆ m_subtractMaskFromSilk

bool PCB_PLOT_PARAMS::m_subtractMaskFromSilk
privateinherited

◆ m_svgPrecision

unsigned PCB_PLOT_PARAMS::m_svgPrecision
privateinherited

precision of coordinates in SVG files: accepted 3 - 6 6 is the internal resolution of Pcbnew

Definition at line 284 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::Format(), PCB_PLOT_PARAMS::GetSvgPrecision(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetSvgPrecision().

◆ m_textMode

PLOT_TEXT_MODE PCB_PLOT_PARAMS::m_textMode
privateinherited

◆ m_useAuxOrigin

bool PCB_PLOT_PARAMS::m_useAuxOrigin
privateinherited

Plot gerbers using auxiliary (drill) origin instead of absolute coordinates.

Definition at line 290 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::Format(), PCB_PLOT_PARAMS::GetUseAuxOrigin(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetUseAuxOrigin().

◆ m_useGerberProtelExtensions

bool PCB_PLOT_PARAMS::m_useGerberProtelExtensions
privateinherited

When plotting gerber files, use a conventional set of Protel extensions instead of .gbr, that is now the official gerber file extension this is a deprecated feature.

Definition at line 261 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::Format(), PCB_PLOT_PARAMS::GetUseGerberProtelExtensions(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetUseGerberProtelExtensions().

◆ m_useGerberX2format

bool PCB_PLOT_PARAMS::m_useGerberX2format
privateinherited

Include attributes from the Gerber X2 format (chapter 5 in revision J2)

Definition at line 264 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::GetUseGerberX2format(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS_PARSER::Parse(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetUseGerberX2format().

◆ m_widthAdjust

int PCB_PLOT_PARAMS::m_widthAdjust
privateinherited

This width factor is intended to compensate PS printers/ plotters that do not strictly obey line width settings.

Only used to plot pads and tracks.

Definition at line 332 of file pcb_plot_params.h.

Referenced by PCB_PLOT_PARAMS::GetWidthAdjust(), PCB_PLOT_PARAMS::IsSameAs(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), and PCB_PLOT_PARAMS::SetWidthAdjust().


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