KiCad PCB EDA Suite
PLOTTER Class Referenceabstract

Base plotter engine class. More...

#include <plotter.h>

Inheritance diagram for PLOTTER:
DXF_PLOTTER GERBER_PLOTTER HPGL_PLOTTER PSLIKE_PLOTTER PDF_PLOTTER PS_PLOTTER SVG_PLOTTER

Public Member Functions

 PLOTTER ()
 
virtual ~PLOTTER ()
 
virtual PLOT_FORMAT GetPlotterType () const =0
 Returns the effective plot engine in use. More...
 
virtual bool StartPlot ()=0
 
virtual bool EndPlot ()=0
 
virtual void SetNegative (bool aNegative)
 
virtual void SetColorMode (bool aColorMode)
 Plot in B/W or color. More...
 
bool GetColorMode () const
 
void SetRenderSettings (RENDER_SETTINGS *aSettings)
 
RENDER_SETTINGSRenderSettings ()
 
virtual void SetPageSettings (const PAGE_INFO &aPageSettings)
 
PAGE_INFOPageSettings ()
 
virtual void SetCurrentLineWidth (int width, void *aData=nullptr)=0
 Set the line width for the next drawing. More...
 
virtual int GetCurrentLineWidth () const
 
virtual void SetColor (const COLOR4D &color)=0
 
virtual void SetDash (PLOT_DASH_TYPE dashed)=0
 
virtual void SetCreator (const wxString &aCreator)
 
virtual void SetTitle (const wxString &aTitle)
 
void AddLineToHeader (const wxString &aExtraString)
 Add a line to the list of free lines to print at the beginning of the file. More...
 
void ClearHeaderLinesList ()
 Remove all lines from the list of free lines to print at the beginning of the file. More...
 
virtual void SetViewport (const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror)=0
 Set the plot offset and scaling for the current plot. More...
 
virtual bool OpenFile (const wxString &aFullFilename)
 Open or create the plot file aFullFilename. More...
 
double GetIUsPerDecimil () const
 The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establishing the viewport. More...
 
int GetPlotterArcLowDef () const
 
int GetPlotterArcHighDef () const
 
virtual void Rect (const wxPoint &p1, const wxPoint &p2, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
 
virtual void Circle (const wxPoint &pos, int diametre, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
 
virtual void Arc (const wxPoint &centre, double StAngle, double EndAngle, int rayon, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)
 Generic fallback: arc rendered as a polyline. More...
 
virtual void Arc (const SHAPE_ARC &aArc)
 
virtual void BezierCurve (const wxPoint &aStart, const wxPoint &aControl1, const wxPoint &aControl2, const wxPoint &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 points: start ctrl1 ctrl2 end. More...
 
virtual void PenTo (const wxPoint &pos, char plume)=0
 Moveto/lineto primitive, moves the 'pen' to the specified direction. More...
 
void MoveTo (const wxPoint &pos)
 
void LineTo (const wxPoint &pos)
 
void FinishTo (const wxPoint &pos)
 
void PenFinish ()
 
virtual void PlotPoly (const std::vector< wxPoint > &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
 Draw a polygon ( filled or not ). More...
 
virtual void PlotPoly (const SHAPE_LINE_CHAIN &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)
 Draw a polygon ( filled or not ). More...
 
virtual void PlotImage (const wxImage &aImage, const wxPoint &aPos, double aScaleFactor)
 Only PostScript plotters can plot bitmaps. More...
 
virtual void ThickSegment (const wxPoint &start, const wxPoint &end, int width, OUTLINE_MODE tracemode, void *aData)
 
virtual void ThickArc (const wxPoint &centre, double StAngle, double EndAngle, int rayon, int width, OUTLINE_MODE tracemode, void *aData)
 
virtual void ThickRect (const wxPoint &p1, const wxPoint &p2, int width, OUTLINE_MODE tracemode, void *aData)
 
virtual void ThickCircle (const wxPoint &pos, int diametre, int width, OUTLINE_MODE tracemode, void *aData)
 
virtual void FilledCircle (const wxPoint &pos, int diametre, OUTLINE_MODE tracemode, void *aData)
 
virtual void FlashPadCircle (const wxPoint &aPadPos, int aDiameter, OUTLINE_MODE aTraceMode, void *aData)=0
 
virtual void FlashPadOval (const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
 
virtual void FlashPadRect (const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
 
virtual void FlashPadRoundRect (const wxPoint &aPadPos, const wxSize &aSize, int aCornerRadius, double aOrient, OUTLINE_MODE aTraceMode, void *aData)=0
 
virtual void FlashPadCustom (const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, SHAPE_POLY_SET *aPolygons, OUTLINE_MODE aTraceMode, void *aData)=0
 
virtual void FlashPadTrapez (const wxPoint &aPadPos, const wxPoint *aCorners, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
 Flash a trapezoidal pad. More...
 
virtual void FlashRegularPolygon (const wxPoint &aShapePos, int aDiameter, int aCornerCount, double aOrient, OUTLINE_MODE aTraceMode, void *aData)=0
 Flash a regular polygon. More...
 
virtual void Text (const wxPoint &aPos, const COLOR4D &aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, bool aMultilineAllowed=false, void *aData=nullptr)
 Draw text with the plotter. More...
 
void Marker (const wxPoint &position, int diametre, unsigned aShapeId)
 Draw a pattern shape number aShapeId, to coord position. More...
 
virtual void SetLayerPolarity (bool aPositive)
 Set the current Gerber layer polarity to positive or negative by writing %LPD*% or %LPC*% to the Gerber file, respectively. More...
 
virtual void SetTextMode (PLOT_TEXT_MODE mode)
 Change the current text mode. More...
 
virtual void SetGerberCoordinatesFormat (int aResolution, bool aUseInches=false)
 
virtual void SetSvgCoordinatesFormat (unsigned aResolution, bool aUseInches=false)
 
virtual void StartBlock (void *aData)
 calling this function allows one to define the beginning of a group of drawing items, for instance in SVG or Gerber format. More...
 
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 Gerber format. More...
 

Static Public Attributes

static const int DO_NOT_SET_LINE_WIDTH = -2
 
static const int USE_DEFAULT_LINE_WIDTH = -1
 
static const unsigned MARKER_COUNT = 58
 Draw a marker (used for the drill map). More...
 

Protected Member Functions

void markerCircle (const wxPoint &pos, int radius)
 Plot a circle centered on the position. More...
 
void markerHBar (const wxPoint &pos, int radius)
 Plot a - bar centered on the position. More...
 
void markerSlash (const wxPoint &pos, int radius)
 Plot a / bar centered on the position. More...
 
void markerBackSlash (const wxPoint &pos, int radius)
 Plot a \ bar centered on the position. More...
 
void markerVBar (const wxPoint &pos, int radius)
 Plot a | bar centered on the position. More...
 
void markerSquare (const wxPoint &position, int radius)
 Plot a square centered on the position. More...
 
void markerLozenge (const wxPoint &position, int radius)
 Plot a lozenge centered on the position. More...
 
void segmentAsOval (const wxPoint &start, const wxPoint &end, int width, OUTLINE_MODE tracemode)
 Convert a thick segment and plot it as an oval. More...
 
void sketchOval (const wxPoint &pos, const wxSize &size, double orient, int width)
 
virtual DPOINT userToDeviceCoordinates (const wxPoint &aCoordinate)
 Modify coordinates according to the orientation, scale factor, and offsets trace. More...
 
virtual DPOINT userToDeviceSize (const wxSize &size)
 Modify size according to the plotter scale factors (wxSize version, returns a DPOINT). More...
 
virtual double userToDeviceSize (double size) const
 Modify size according to the plotter scale factors (simple double version). More...
 
double GetDotMarkLenIU () const
 
double GetDashMarkLenIU () const
 
double GetDashGapLenIU () const
 

Protected Attributes

double m_plotScale
 Plot scale - chosen by the user (even implicitly with 'fit in a4') More...
 
double m_IUsPerDecimil
 
double m_iuPerDeviceUnit
 
wxPoint m_plotOffset
 
bool m_plotMirror
 
bool m_mirrorIsHorizontal
 
bool m_yaxisReversed
 
FILE * m_outputFile
 Output file. More...
 
bool m_colorMode
 
bool m_negativeMode
 
int m_currentPenWidth
 
char m_penState
 
wxPoint m_penLastpos
 
wxString m_creator
 
wxString m_filename
 
wxString m_title
 
PAGE_INFO m_pageInfo
 
wxSize m_paperSize
 
wxArrayString m_headerExtraLines
 
RENDER_SETTINGSm_renderSettings
 

Detailed Description

Base plotter engine class.

General rule: all the interface with the caller is done in IU, the IU size is specified with SetViewport. Internal and output processing is usually done in decimils (or whatever unit the effective engine class need to use)

Definition at line 121 of file plotter.h.

Constructor & Destructor Documentation

◆ PLOTTER()

PLOTTER::PLOTTER ( )

Definition at line 50 of file plotter.cpp.

51 {
52  m_plotScale = 1;
53  m_currentPenWidth = -1; // To-be-set marker
54  m_penState = 'Z'; // End-of-path idle
55  m_plotMirror = false; // Plot mirror option flag
56  m_mirrorIsHorizontal = true;
57  m_yaxisReversed = false;
58  m_outputFile = nullptr;
59  m_colorMode = false; // Starts as a BW plot
60  m_negativeMode = false;
61  // Temporary init to avoid not initialized vars, will be set later
62  m_IUsPerDecimil = 1; // will be set later to the actual value
63  m_iuPerDeviceUnit = 1; // will be set later to the actual value
64  m_renderSettings = nullptr;
65 }
FILE * m_outputFile
Output file.
Definition: plotter.h:590
double m_iuPerDeviceUnit
Definition: plotter.h:581
double m_IUsPerDecimil
Definition: plotter.h:579
double m_plotScale
Plot scale - chosen by the user (even implicitly with 'fit in a4')
Definition: plotter.h:573
bool m_yaxisReversed
Definition: plotter.h:587
bool m_plotMirror
Definition: plotter.h:584
bool m_colorMode
Definition: plotter.h:593
int m_currentPenWidth
Definition: plotter.h:595
RENDER_SETTINGS * m_renderSettings
Definition: plotter.h:607
bool m_negativeMode
Definition: plotter.h:594
char m_penState
Definition: plotter.h:596
bool m_mirrorIsHorizontal
Definition: plotter.h:586

References m_colorMode, m_currentPenWidth, m_iuPerDeviceUnit, m_IUsPerDecimil, m_mirrorIsHorizontal, m_negativeMode, m_outputFile, m_penState, m_plotMirror, m_plotScale, m_renderSettings, and m_yaxisReversed.

◆ ~PLOTTER()

PLOTTER::~PLOTTER ( )
virtual

Definition at line 67 of file plotter.cpp.

68 {
69  // Emergency cleanup, but closing the file is
70  // usually made in EndPlot().
71  if( m_outputFile )
72  fclose( m_outputFile );
73 }
FILE * m_outputFile
Output file.
Definition: plotter.h:590

References m_outputFile.

Member Function Documentation

◆ AddLineToHeader()

void PLOTTER::AddLineToHeader ( const wxString &  aExtraString)
inline

Add a line to the list of free lines to print at the beginning of the file.

Parameters
aExtraStringis the string to print

Definition at line 183 of file plotter.h.

184  {
185  m_headerExtraLines.Add( aExtraString );
186  }
wxArrayString m_headerExtraLines
Definition: plotter.h:605

References m_headerExtraLines.

Referenced by AddGerberX2Attribute(), AddGerberX2Header(), GERBER_WRITER::createDrillFile(), and PLACEFILE_GERBER_WRITER::CreatePlaceFile().

◆ Arc() [1/2]

void PLOTTER::Arc ( const wxPoint &  centre,
double  StAngle,
double  EndAngle,
int  rayon,
FILL_TYPE  fill,
int  width = USE_DEFAULT_LINE_WIDTH 
)
virtual

Generic fallback: arc rendered as a polyline.

Reimplemented in SVG_PLOTTER, PDF_PLOTTER, PS_PLOTTER, HPGL_PLOTTER, DXF_PLOTTER, and GERBER_PLOTTER.

Definition at line 164 of file plotter.cpp.

166 {
167  wxPoint start, end;
168  const int delta = 50; // increment (in 0.1 degrees) to draw circles
169 
170  if( StAngle > EndAngle )
171  std::swap( StAngle, EndAngle );
172 
173  SetCurrentLineWidth( width );
174  /* Please NOTE the different sign due to Y-axis flip */
175  start.x = centre.x + KiROUND( cosdecideg( radius, -StAngle ) );
176  start.y = centre.y + KiROUND( sindecideg( radius, -StAngle ) );
177 
178  if( fill != FILL_TYPE::NO_FILL )
179  {
180  MoveTo( centre );
181  LineTo( start );
182  }
183  else
184  {
185  MoveTo( start );
186  }
187 
188  for( int ii = StAngle + delta; ii < EndAngle; ii += delta )
189  {
190  end.x = centre.x + KiROUND( cosdecideg( radius, -ii ) );
191  end.y = centre.y + KiROUND( sindecideg( radius, -ii ) );
192  LineTo( end );
193  }
194 
195  end.x = centre.x + KiROUND( cosdecideg( radius, -EndAngle ) );
196  end.y = centre.y + KiROUND( sindecideg( radius, -EndAngle ) );
197 
198  if( fill != FILL_TYPE::NO_FILL )
199  {
200  LineTo( end );
201  FinishTo( centre );
202  }
203  else
204  {
205  FinishTo( end );
206  }
207 }
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
void LineTo(const wxPoint &pos)
Definition: plotter.h:268
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263
double cosdecideg(double r, double a)
Circle generation utility: computes r * cos(a) Where a is in decidegrees, not in radians.
Definition: trigo.h:439
double sindecideg(double r, double a)
Circle generation utility: computes r * sin(a) Where a is in decidegrees, not in radians.
Definition: trigo.h:430
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:70
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References cosdecideg(), FinishTo(), KiROUND(), LineTo(), MoveTo(), NO_FILL, SetCurrentLineWidth(), and sindecideg().

Referenced by Arc(), LIB_ARC::Plot(), sketchOval(), and ThickArc().

◆ Arc() [2/2]

void PLOTTER::Arc ( const SHAPE_ARC aArc)
virtual

Reimplemented in GERBER_PLOTTER.

Definition at line 157 of file plotter.cpp.

158 {
159  Arc( wxPoint( aArc.GetCenter() ), aArc.GetStartAngle(), aArc.GetEndAngle(), aArc.GetRadius(),
160  FILL_TYPE::NO_FILL, aArc.GetWidth() );
161 }
double GetRadius() const
Definition: shape_arc.cpp:411
virtual void Arc(const wxPoint &centre, double StAngle, double EndAngle, int rayon, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)
Generic fallback: arc rendered as a polyline.
Definition: plotter.cpp:164
double GetStartAngle() const
Definition: shape_arc.cpp:363
double GetEndAngle() const
Definition: shape_arc.cpp:373
int GetWidth() const
Definition: shape_arc.h:112
VECTOR2I GetCenter() const
Definition: shape_arc.cpp:383

References Arc(), SHAPE_ARC::GetCenter(), SHAPE_ARC::GetEndAngle(), SHAPE_ARC::GetRadius(), SHAPE_ARC::GetStartAngle(), SHAPE_ARC::GetWidth(), and NO_FILL.

◆ BezierCurve()

void PLOTTER::BezierCurve ( const wxPoint &  aStart,
const wxPoint &  aControl1,
const wxPoint &  aControl2,
const wxPoint &  aEnd,
int  aTolerance,
int  aLineThickness = USE_DEFAULT_LINE_WIDTH 
)
virtual

Generic fallback: Cubic Bezier curve rendered as a polyline In KiCad the bezier curves have 4 control points: start ctrl1 ctrl2 end.

Reimplemented in SVG_PLOTTER.

Definition at line 210 of file plotter.cpp.

213 {
214  // Generic fallback: Quadratic Bezier curve plotted as a polyline
215  int minSegLen = aLineThickness; // The segment min length to approximate a bezier curve
216 
217  std::vector<wxPoint> ctrlPoints;
218  ctrlPoints.push_back( aStart );
219  ctrlPoints.push_back( aControl1 );
220  ctrlPoints.push_back( aControl2 );
221  ctrlPoints.push_back( aEnd );
222 
223  BEZIER_POLY bezier_converter( ctrlPoints );
224 
225  std::vector<wxPoint> approxPoints;
226  bezier_converter.GetPoly( approxPoints, minSegLen );
227 
228  SetCurrentLineWidth( aLineThickness );
229  MoveTo( aStart );
230 
231  for( unsigned ii = 1; ii < approxPoints.size()-1; ii++ )
232  LineTo( approxPoints[ii] );
233 
234  FinishTo( aEnd );
235 }
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
void LineTo(const wxPoint &pos)
Definition: plotter.h:268
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263
Bezier curves to polygon converter.
Definition: bezier_curves.h:36
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References FinishTo(), BEZIER_POLY::GetPoly(), LineTo(), MoveTo(), and SetCurrentLineWidth().

Referenced by SVG_PLOTTER::BezierCurve(), BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), and BRDITEMS_PLOTTER::PlotPcbShape().

◆ Circle()

virtual void PLOTTER::Circle ( const wxPoint &  pos,
int  diametre,
FILL_TYPE  fill,
int  width = USE_DEFAULT_LINE_WIDTH 
)
pure virtual

◆ ClearHeaderLinesList()

void PLOTTER::ClearHeaderLinesList ( )
inline

Remove all lines from the list of free lines to print at the beginning of the file.

Definition at line 191 of file plotter.h.

192  {
193  m_headerExtraLines.Clear();
194  }
wxArrayString m_headerExtraLines
Definition: plotter.h:605

References m_headerExtraLines.

Referenced by StartPlotBoard().

◆ EndBlock()

virtual void PLOTTER::EndBlock ( void *  aData)
inlinevirtual

calling this function allows one to define the end of a group of drawing items for instance in SVG or Gerber format.

the group is started by StartBlock()

Parameters
aDatacan define any parameter for most of plotters: do nothing

Reimplemented in SVG_PLOTTER, and GERBER_PLOTTER.

Definition at line 496 of file plotter.h.

496 {}

Referenced by SCH_SYMBOL::Plot(), BRDITEMS_PLOTTER::PlotFilledAreas(), and PlotStandardLayer().

◆ EndPlot()

◆ FilledCircle()

void PLOTTER::FilledCircle ( const wxPoint &  pos,
int  diametre,
OUTLINE_MODE  tracemode,
void *  aData 
)
virtual

Reimplemented in GERBER_PLOTTER.

Definition at line 591 of file plotter.cpp.

592 {
593  if( tracemode == FILLED )
594  {
595  Circle( pos, diametre, FILL_TYPE::FILLED_SHAPE, 0 );
596  }
597  else
598  {
599  SetCurrentLineWidth( -1 );
600  Circle( pos, diametre, FILL_TYPE::NO_FILL, -1 );
601  }
602 }
virtual void Circle(const wxPoint &pos, int diametre, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References Circle(), FILLED, FILLED_SHAPE, NO_FILL, and SetCurrentLineWidth().

Referenced by BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), and BRDITEMS_PLOTTER::PlotPcbShape().

◆ FinishTo()

void PLOTTER::FinishTo ( const wxPoint &  pos)
inline

◆ FlashPadCircle()

virtual void PLOTTER::FlashPadCircle ( const wxPoint &  aPadPos,
int  aDiameter,
OUTLINE_MODE  aTraceMode,
void *  aData 
)
pure virtual
Parameters
aPadPosPosition of the shape (center of the rectangle.
aDiameteris the diameter of round pad.
aTraceModeis the drawing mode, FILLED or SKETCH.
aDatais an auxiliary info (mainly for gerber format attributes).

Implemented in HPGL_PLOTTER, DXF_PLOTTER, GERBER_PLOTTER, and PSLIKE_PLOTTER.

Referenced by BRDITEMS_PLOTTER::plotOneDrillMark(), BRDITEMS_PLOTTER::PlotPad(), and PlotStandardLayer().

◆ FlashPadCustom()

virtual void PLOTTER::FlashPadCustom ( const wxPoint &  aPadPos,
const wxSize &  aSize,
double  aPadOrient,
SHAPE_POLY_SET aPolygons,
OUTLINE_MODE  aTraceMode,
void *  aData 
)
pure virtual
Parameters
aPadPosPosition of the shape.
aSizeis the size of round reference pad.
aPadOrientis the pad rotation, used only with aperture macros (Gerber plotter).
aPolygonsthe shape as polygon set.
aTraceModeis the drawing mode, FILLED or SKETCH.
aDataan auxiliary info (mainly for gerber format attributes).

Implemented in DXF_PLOTTER, HPGL_PLOTTER, GERBER_PLOTTER, and PSLIKE_PLOTTER.

Referenced by BRDITEMS_PLOTTER::PlotPad().

◆ FlashPadOval()

virtual void PLOTTER::FlashPadOval ( const wxPoint &  aPadPos,
const wxSize &  aSize,
double  aPadOrient,
OUTLINE_MODE  aTraceMode,
void *  aData 
)
pure virtual
Parameters
aPadPosPosition of the shape (center of the rectangle.
aSizeis the size of oblong shape.
aPadOrientThe rotation of the shape.
aTraceModeis the drawing mode, FILLED or SKETCH.
aDataan auxiliary info (mainly for gerber format attributes).

Implemented in DXF_PLOTTER, HPGL_PLOTTER, GERBER_PLOTTER, and PSLIKE_PLOTTER.

Referenced by GENDRILL_WRITER_BASE::plotDrillMarks(), BRDITEMS_PLOTTER::plotOneDrillMark(), BRDITEMS_PLOTTER::PlotPad(), and segmentAsOval().

◆ FlashPadRect()

virtual void PLOTTER::FlashPadRect ( const wxPoint &  aPadPos,
const wxSize &  aSize,
double  aPadOrient,
OUTLINE_MODE  aTraceMode,
void *  aData 
)
pure virtual
Parameters
aPadPosPosition of the shape (center of the rectangle).
aSizeis the size of rounded rect.
aPadOrientThe rotation of the shape.
aTraceModeis the drawing mode, FILLED or SKETCH.
aDataan auxiliary info (mainly for gerber format attributes).

Implemented in DXF_PLOTTER, HPGL_PLOTTER, GERBER_PLOTTER, and PSLIKE_PLOTTER.

Referenced by BRDITEMS_PLOTTER::PlotPad().

◆ FlashPadRoundRect()

virtual void PLOTTER::FlashPadRoundRect ( const wxPoint &  aPadPos,
const wxSize &  aSize,
int  aCornerRadius,
double  aOrient,
OUTLINE_MODE  aTraceMode,
void *  aData 
)
pure virtual
Parameters
aPadPosPosition of the shape (center of the rectangle.
aSizeis the size of rounded rect.
aCornerRadiusRadius of the rounded corners.
aOrientThe rotation of the shape.
aTraceModeis the drawing mode, FILLED or SKETCH.
aDataan auxiliary info (mainly for gerber format attributes).

Implemented in DXF_PLOTTER, HPGL_PLOTTER, GERBER_PLOTTER, and PSLIKE_PLOTTER.

Referenced by BRDITEMS_PLOTTER::PlotPad().

◆ FlashPadTrapez()

virtual void PLOTTER::FlashPadTrapez ( const wxPoint &  aPadPos,
const wxPoint *  aCorners,
double  aPadOrient,
OUTLINE_MODE  aTraceMode,
void *  aData 
)
pure virtual

Flash a trapezoidal pad.

Parameters
aPadPosis the the position of the shape.
aCornersis the list of 4 corners positions, relative to the shape position, pad orientation 0.
aPadOrientis the rotation of the shape.
aTraceModeis the drawing mode, FILLED or SKETCH.
aDataan auxiliary info (mainly for gerber format attributes).

Implemented in DXF_PLOTTER, HPGL_PLOTTER, GERBER_PLOTTER, and PSLIKE_PLOTTER.

Referenced by BRDITEMS_PLOTTER::PlotPad().

◆ FlashRegularPolygon()

virtual void PLOTTER::FlashRegularPolygon ( const wxPoint &  aShapePos,
int  aDiameter,
int  aCornerCount,
double  aOrient,
OUTLINE_MODE  aTraceMode,
void *  aData 
)
pure virtual

Flash a regular polygon.

Useful only in Gerber files to flash a regular polygon.

Parameters
aShapePosis the center of the circle containing the polygon.
aRadiusis the radius of the circle containing the polygon.
aCornerCountis the number of vertices.
aOrientis the polygon rotation in degrees.
aDatais a auxiliary parameter used (if needed) to handle extra info specific to the plotter.

Implemented in DXF_PLOTTER, HPGL_PLOTTER, GERBER_PLOTTER, and PSLIKE_PLOTTER.

◆ GetColorMode()

◆ GetCurrentLineWidth()

◆ GetDashGapLenIU()

double PLOTTER::GetDashGapLenIU ( ) const
protected

Definition at line 151 of file plotter.cpp.

152 {
154 }
virtual int GetCurrentLineWidth() const
Definition: plotter.h:168
virtual DPOINT userToDeviceSize(const wxSize &size)
Modify size according to the plotter scale factors (wxSize version, returns a DPOINT).
Definition: plotter.cpp:124
#define DASH_GAP_LEN(aLineWidth)

References DASH_GAP_LEN, GetCurrentLineWidth(), and userToDeviceSize().

Referenced by PS_PLOTTER::SetDash(), PDF_PLOTTER::SetDash(), and SVG_PLOTTER::setSVGPlotStyle().

◆ GetDashMarkLenIU()

double PLOTTER::GetDashMarkLenIU ( ) const
protected

Definition at line 145 of file plotter.cpp.

146 {
148 }
#define DASH_MARK_LEN(aLineWidth)
virtual int GetCurrentLineWidth() const
Definition: plotter.h:168
virtual DPOINT userToDeviceSize(const wxSize &size)
Modify size according to the plotter scale factors (wxSize version, returns a DPOINT).
Definition: plotter.cpp:124

References DASH_MARK_LEN, GetCurrentLineWidth(), and userToDeviceSize().

Referenced by PS_PLOTTER::SetDash(), PDF_PLOTTER::SetDash(), and SVG_PLOTTER::setSVGPlotStyle().

◆ GetDotMarkLenIU()

double PLOTTER::GetDotMarkLenIU ( ) const
protected

Definition at line 139 of file plotter.cpp.

140 {
142 }
virtual int GetCurrentLineWidth() const
Definition: plotter.h:168
#define DOT_MARK_LEN(aLineWidth)
virtual DPOINT userToDeviceSize(const wxSize &size)
Modify size according to the plotter scale factors (wxSize version, returns a DPOINT).
Definition: plotter.cpp:124

References DOT_MARK_LEN, GetCurrentLineWidth(), and userToDeviceSize().

Referenced by PS_PLOTTER::SetDash(), PDF_PLOTTER::SetDash(), and SVG_PLOTTER::setSVGPlotStyle().

◆ GetIUsPerDecimil()

double PLOTTER::GetIUsPerDecimil ( ) const
inline

The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establishing the viewport.

Here they can be get back again

Definition at line 225 of file plotter.h.

225 { return m_IUsPerDecimil; }
double m_IUsPerDecimil
Definition: plotter.h:579

References m_IUsPerDecimil.

Referenced by PlotDrawingSheet().

◆ GetPlotterArcHighDef()

◆ GetPlotterArcLowDef()

int PLOTTER::GetPlotterArcLowDef ( ) const
inline

Definition at line 227 of file plotter.h.

227 { return m_IUsPerDecimil * 8; }
double m_IUsPerDecimil
Definition: plotter.h:579

References m_IUsPerDecimil.

◆ GetPlotterType()

virtual PLOT_FORMAT PLOTTER::GetPlotterType ( ) const
pure virtual

Returns the effective plot engine in use.

It's not very OO but for now is required since some things are only done with some output devices (like drill marks, emitted only for postscript

Implemented in SVG_PLOTTER, PDF_PLOTTER, PS_PLOTTER, DXF_PLOTTER, GERBER_PLOTTER, and HPGL_PLOTTER.

Referenced by BRDITEMS_PLOTTER::PlotFilledAreas(), PlotOneBoardLayer(), BRDITEMS_PLOTTER::PlotPad(), and StartPlotBoard().

◆ LineTo()

void PLOTTER::LineTo ( const wxPoint &  pos)
inline

Definition at line 268 of file plotter.h.

269  {
270  PenTo( pos, 'D' );
271  }
virtual void PenTo(const wxPoint &pos, char plume)=0
Moveto/lineto primitive, moves the 'pen' to the specified direction.

References PenTo().

Referenced by Arc(), BezierCurve(), DXF_PLOTTER::FlashPadCustom(), DXF_PLOTTER::FlashPadRect(), DXF_PLOTTER::FlashPadRoundRect(), DXF_PLOTTER::FlashPadTrapez(), SCH_SHEET::Plot(), GERBER_PLOTTER::plotArc(), GERBER_PLOTTER::PlotPoly(), HPGL_PLOTTER::PlotPoly(), DXF_PLOTTER::PlotPoly(), GERBER_PLOTTER::plotRoundRectAsRegion(), LIB_PIN::PlotSymbol(), and DXF_PLOTTER::Rect().

◆ Marker()

void PLOTTER::Marker ( const wxPoint &  position,
int  diametre,
unsigned  aShapeId 
)

Draw a pattern shape number aShapeId, to coord position.

Parameters
aPositionis the position of the marker.
aDiameteris the diameter of the marker.
aShapeIdis the index (used to generate forms characters).

Definition at line 338 of file plotter.cpp.

339 {
340  int radius = diametre / 2;
341  /* Marker are composed by a series of 'parts' superimposed; not every
342  combination make sense, obviously. Since they are used in order I
343  tried to keep the uglier/more complex constructions at the end.
344  Also I avoided the |/ |\ -/ -\ construction because they're *very*
345  ugly... if needed they could be added anyway... I'd like to see
346  a board with more than 58 drilling/slotting tools!
347  If Visual C++ supported the 0b literals they would be optimally
348  and easily encoded as an integer array. We have to do with octal */
349  static const unsigned char marker_patterns[MARKER_COUNT] = {
350  // Bit order: O Square Lozenge - | \ /
351  // First choice: simple shapes
352  0003, // X
353  0100, // O
354  0014, // +
355  0040, // Sq
356  0020, // Lz
357  // Two simple shapes
358  0103, // X O
359  0017, // X +
360  0043, // X Sq
361  0023, // X Lz
362  0114, // O +
363  0140, // O Sq
364  0120, // O Lz
365  0054, // + Sq
366  0034, // + Lz
367  0060, // Sq Lz
368  // Three simple shapes
369  0117, // X O +
370  0143, // X O Sq
371  0123, // X O Lz
372  0057, // X + Sq
373  0037, // X + Lz
374  0063, // X Sq Lz
375  0154, // O + Sq
376  0134, // O + Lz
377  0074, // + Sq Lz
378  // Four simple shapes
379  0174, // O Sq Lz +
380  0163, // X O Sq Lz
381  0157, // X O Sq +
382  0137, // X O Lz +
383  0077, // X Sq Lz +
384  // This draws *everything *
385  0177, // X O Sq Lz +
386  // Here we use the single bars... so the cross is forbidden
387  0110, // O -
388  0104, // O |
389  0101, // O /
390  0050, // Sq -
391  0044, // Sq |
392  0041, // Sq /
393  0030, // Lz -
394  0024, // Lz |
395  0021, // Lz /
396  0150, // O Sq -
397  0144, // O Sq |
398  0141, // O Sq /
399  0130, // O Lz -
400  0124, // O Lz |
401  0121, // O Lz /
402  0070, // Sq Lz -
403  0064, // Sq Lz |
404  0061, // Sq Lz /
405  0170, // O Sq Lz -
406  0164, // O Sq Lz |
407  0161, // O Sq Lz /
408  // Last resort: the backlash component (easy to confound)
409  0102, // \ O
410  0042, // \ Sq
411  0022, // \ Lz
412  0142, // \ O Sq
413  0122, // \ O Lz
414  0062, // \ Sq Lz
415  0162 // \ O Sq Lz
416  };
417  if( aShapeId >= MARKER_COUNT )
418  {
419  // Fallback shape
420  markerCircle( position, radius );
421  }
422  else
423  {
424  // Decode the pattern and draw the corresponding parts
425  unsigned char pat = marker_patterns[aShapeId];
426  if( pat & 0001 )
427  markerSlash( position, radius );
428  if( pat & 0002 )
429  markerBackSlash( position, radius );
430  if( pat & 0004 )
431  markerVBar( position, radius );
432  if( pat & 0010 )
433  markerHBar( position, radius );
434  if( pat & 0020 )
435  markerLozenge( position, radius );
436  if( pat & 0040 )
437  markerSquare( position, radius );
438  if( pat & 0100 )
439  markerCircle( position, radius );
440  }
441 }
void markerHBar(const wxPoint &pos, int radius)
Plot a - bar centered on the position.
Definition: plotter.cpp:310
static const unsigned MARKER_COUNT
Draw a marker (used for the drill map).
Definition: plotter.h:436
void markerSlash(const wxPoint &pos, int radius)
Plot a / bar centered on the position.
Definition: plotter.cpp:317
void markerLozenge(const wxPoint &position, int radius)
Plot a lozenge centered on the position.
Definition: plotter.cpp:286
void markerCircle(const wxPoint &pos, int radius)
Plot a circle centered on the position.
Definition: plotter.cpp:280
void markerVBar(const wxPoint &pos, int radius)
Plot a | bar centered on the position.
Definition: plotter.cpp:331
void markerSquare(const wxPoint &position, int radius)
Plot a square centered on the position.
Definition: plotter.cpp:255
void markerBackSlash(const wxPoint &pos, int radius)
Plot a \ bar centered on the position.
Definition: plotter.cpp:324

References MARKER_COUNT, markerBackSlash(), markerCircle(), markerHBar(), markerLozenge(), markerSlash(), markerSquare(), and markerVBar().

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), and GENDRILL_WRITER_BASE::plotDrillMarks().

◆ markerBackSlash()

void PLOTTER::markerBackSlash ( const wxPoint &  pos,
int  radius 
)
protected

Plot a \ bar centered on the position.

Building block for markers

Definition at line 324 of file plotter.cpp.

325 {
326  MoveTo( wxPoint( pos.x + radius, pos.y - radius ) );
327  FinishTo( wxPoint( pos.x - radius, pos.y + radius ) );
328 }
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263

References FinishTo(), and MoveTo().

Referenced by Marker().

◆ markerCircle()

void PLOTTER::markerCircle ( const wxPoint &  pos,
int  radius 
)
protected

Plot a circle centered on the position.

Building block for markers

Definition at line 280 of file plotter.cpp.

281 {
282  Circle( position, radius * 2, FILL_TYPE::NO_FILL, GetCurrentLineWidth() );
283 }
virtual int GetCurrentLineWidth() const
Definition: plotter.h:168
virtual void Circle(const wxPoint &pos, int diametre, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0

References Circle(), GetCurrentLineWidth(), and NO_FILL.

Referenced by Marker().

◆ markerHBar()

void PLOTTER::markerHBar ( const wxPoint &  pos,
int  radius 
)
protected

Plot a - bar centered on the position.

Building block for markers

Definition at line 310 of file plotter.cpp.

311 {
312  MoveTo( wxPoint( pos.x - radius, pos.y ) );
313  FinishTo( wxPoint( pos.x + radius, pos.y ) );
314 }
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263

References FinishTo(), and MoveTo().

Referenced by Marker().

◆ markerLozenge()

void PLOTTER::markerLozenge ( const wxPoint &  position,
int  radius 
)
protected

Plot a lozenge centered on the position.

Building block for markers

Definition at line 286 of file plotter.cpp.

287 {
288  std::vector< wxPoint > corner_list;
289  wxPoint corner;
290  corner.x = position.x;
291  corner.y = position.y + radius;
292  corner_list.push_back( corner );
293  corner.x = position.x + radius;
294  corner.y = position.y,
295  corner_list.push_back( corner );
296  corner.x = position.x;
297  corner.y = position.y - radius;
298  corner_list.push_back( corner );
299  corner.x = position.x - radius;
300  corner.y = position.y;
301  corner_list.push_back( corner );
302  corner.x = position.x;
303  corner.y = position.y + radius;
304  corner_list.push_back( corner );
305 
307 }
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
Draw a polygon ( filled or not ).
virtual int GetCurrentLineWidth() const
Definition: plotter.h:168

References GetCurrentLineWidth(), NO_FILL, and PlotPoly().

Referenced by Marker().

◆ markerSlash()

void PLOTTER::markerSlash ( const wxPoint &  pos,
int  radius 
)
protected

Plot a / bar centered on the position.

Building block for markers

Definition at line 317 of file plotter.cpp.

318 {
319  MoveTo( wxPoint( pos.x - radius, pos.y - radius ) );
320  FinishTo( wxPoint( pos.x + radius, pos.y + radius ) );
321 }
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263

References FinishTo(), and MoveTo().

Referenced by Marker().

◆ markerSquare()

void PLOTTER::markerSquare ( const wxPoint &  position,
int  radius 
)
protected

Plot a square centered on the position.

Building block for markers

Definition at line 255 of file plotter.cpp.

256 {
257  double r = KiROUND( radius / 1.4142 );
258  std::vector< wxPoint > corner_list;
259  wxPoint corner;
260  corner.x = position.x + r;
261  corner.y = position.y + r;
262  corner_list.push_back( corner );
263  corner.x = position.x + r;
264  corner.y = position.y - r;
265  corner_list.push_back( corner );
266  corner.x = position.x - r;
267  corner.y = position.y - r;
268  corner_list.push_back( corner );
269  corner.x = position.x - r;
270  corner.y = position.y + r;
271  corner_list.push_back( corner );
272  corner.x = position.x + r;
273  corner.y = position.y + r;
274  corner_list.push_back( corner );
275 
277 }
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
Draw a polygon ( filled or not ).
virtual int GetCurrentLineWidth() const
Definition: plotter.h:168
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:70

References GetCurrentLineWidth(), KiROUND(), NO_FILL, and PlotPoly().

Referenced by Marker().

◆ markerVBar()

void PLOTTER::markerVBar ( const wxPoint &  pos,
int  radius 
)
protected

Plot a | bar centered on the position.

Building block for markers

Definition at line 331 of file plotter.cpp.

332 {
333  MoveTo( wxPoint( pos.x, pos.y - radius ) );
334  FinishTo( wxPoint( pos.x, pos.y + radius ) );
335 }
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263

References FinishTo(), and MoveTo().

Referenced by Marker().

◆ MoveTo()

◆ OpenFile()

bool PLOTTER::OpenFile ( const wxString &  aFullFilename)
virtual

Open or create the plot file aFullFilename.

Parameters
aFullFilenameis the full file name of the file to create.
Returns
true if success, false if the file cannot be created/opened.

Virtual because some plotters use ascii files, some others binary files (PDF) The base class open the file in text mode

Reimplemented in PDF_PLOTTER.

Definition at line 76 of file plotter.cpp.

77 {
78  m_filename = aFullFilename;
79 
80  wxASSERT( !m_outputFile );
81 
82  // Open the file in text mode (not suitable for all plotters
83  // but only for most of them
84  m_outputFile = wxFopen( m_filename, wxT( "wt" ) );
85 
86  if( m_outputFile == NULL )
87  return false ;
88 
89  return true;
90 }
wxString m_filename
Definition: plotter.h:600
FILE * m_outputFile
Output file.
Definition: plotter.h:590
#define NULL

References m_filename, m_outputFile, and NULL.

Referenced by GERBER_WRITER::createDrillFile(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), GENDRILL_WRITER_BASE::genDrillMapFile(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDxf(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), StartPlotBoard(), and SYMBOL_EDIT_FRAME::SVGPlotSymbol().

◆ PageSettings()

PAGE_INFO& PLOTTER::PageSettings ( )
inline

◆ PenFinish()

void PLOTTER::PenFinish ( )
inline

Definition at line 279 of file plotter.h.

280  {
281  // The point is not important with Z motion
282  PenTo( wxPoint( 0, 0 ), 'Z' );
283  }
virtual void PenTo(const wxPoint &pos, char plume)=0
Moveto/lineto primitive, moves the 'pen' to the specified direction.

References PenTo().

Referenced by HPGL_PLOTTER::Circle(), HPGL_PLOTTER::FlashPadCircle(), GERBER_PLOTTER::PlotPoly(), HPGL_PLOTTER::PlotPoly(), DXF_PLOTTER::PlotPoly(), and HPGL_PLOTTER::Rect().

◆ PenTo()

virtual void PLOTTER::PenTo ( const wxPoint &  pos,
char  plume 
)
pure virtual

Moveto/lineto primitive, moves the 'pen' to the specified direction.

Parameters
posis the target position.
plumespecifies the kind of motion: 'U' only moves the pen, 'D' draw a line from the current position and 'Z' finish the drawing and returns the 'pen' to rest (flushes the trace).

Implemented in SVG_PLOTTER, PDF_PLOTTER, PS_PLOTTER, HPGL_PLOTTER, DXF_PLOTTER, and GERBER_PLOTTER.

Referenced by FinishTo(), LineTo(), MoveTo(), and PenFinish().

◆ PlotImage()

void PLOTTER::PlotImage ( const wxImage &  aImage,
const wxPoint &  aPos,
double  aScaleFactor 
)
virtual

Only PostScript plotters can plot bitmaps.

A rectangle is plotted for plotters that cannot plot a bitmap.

Parameters
aImageis the bitmap.
aPosis position of the center of the bitmap.
aScaleFactoris the scale factor to apply to the bitmap size (this is not the plot scale factor).

Reimplemented in SVG_PLOTTER, PDF_PLOTTER, and PS_PLOTTER.

Definition at line 238 of file plotter.cpp.

239 {
240  wxSize size( aImage.GetWidth() * aScaleFactor,
241  aImage.GetHeight() * aScaleFactor );
242 
243  wxPoint start = aPos;
244  start.x -= size.x / 2;
245  start.y -= size.y / 2;
246 
247  wxPoint end = start;
248  end.x += size.x;
249  end.y += size.y;
250 
251  Rect( start, end, FILL_TYPE::NO_FILL );
252 }
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0

References NO_FILL, and Rect().

Referenced by BITMAP_BASE::PlotImage(), and SVG_PLOTTER::PlotImage().

◆ PlotPoly() [1/2]

virtual void PLOTTER::PlotPoly ( const std::vector< wxPoint > &  aCornerList,
FILL_TYPE  aFill,
int  aWidth = USE_DEFAULT_LINE_WIDTH,
void *  aData = nullptr 
)
pure virtual

◆ PlotPoly() [2/2]

void PLOTTER::PlotPoly ( const SHAPE_LINE_CHAIN aCornerList,
FILL_TYPE  aFill,
int  aWidth = USE_DEFAULT_LINE_WIDTH,
void *  aData = nullptr 
)
virtual

Draw a polygon ( filled or not ).

Parameters
aCornerListis the corners list (a SHAPE_LINE_CHAIN). must be closed (IsClosed() == true) for a polygon. Otherwise this is a polyline.
aFillis the type of fill.
aWidthis the line width.
aDatais an auxiliary info (mainly for gerber format).

Reimplemented in GERBER_PLOTTER.

Definition at line 605 of file plotter.cpp.

607 {
608  std::vector<wxPoint> cornerList;
609  cornerList.reserve( aCornerList.PointCount() );
610 
611  for( int ii = 0; ii < aCornerList.PointCount(); ii++ )
612  cornerList.emplace_back( aCornerList.CPoint( ii ) );
613 
614  if( aCornerList.IsClosed() && cornerList.front() != cornerList.back() )
615  cornerList.emplace_back( aCornerList.CPoint( 0 ) );
616 
617  PlotPoly( cornerList, aFill, aWidth, aData );
618 }
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
Draw a polygon ( filled or not ).
int PointCount() const
Function PointCount()
const VECTOR2I & CPoint(int aIndex) const
Function Point()
bool IsClosed() const override
Function IsClosed()

References SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::IsClosed(), PlotPoly(), and SHAPE_LINE_CHAIN::PointCount().

◆ Rect()

virtual void PLOTTER::Rect ( const wxPoint &  p1,
const wxPoint &  p2,
FILL_TYPE  fill,
int  width = USE_DEFAULT_LINE_WIDTH 
)
pure virtual

◆ RenderSettings()

◆ segmentAsOval()

void PLOTTER::segmentAsOval ( const wxPoint &  start,
const wxPoint &  end,
int  width,
OUTLINE_MODE  tracemode 
)
protected

Convert a thick segment and plot it as an oval.

Definition at line 444 of file plotter.cpp.

446 {
447  wxPoint center( (start.x + end.x) / 2, (start.y + end.y) / 2 );
448  wxSize size( end.x - start.x, end.y - start.y );
449  double orient;
450 
451  if( size.y == 0 )
452  orient = 0;
453  else if( size.x == 0 )
454  orient = 900;
455  else
456  orient = -ArcTangente( size.y, size.x );
457 
458  size.x = KiROUND( EuclideanNorm( size ) ) + width;
459  size.y = width;
460 
461  FlashPadOval( center, size, orient, tracemode, NULL );
462 }
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition: trigo.h:148
virtual void FlashPadOval(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
#define NULL
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:70
double ArcTangente(int dy, int dx)
Definition: trigo.cpp:182

References ArcTangente(), EuclideanNorm(), FlashPadOval(), KiROUND(), and NULL.

Referenced by GERBER_PLOTTER::ThickSegment(), HPGL_PLOTTER::ThickSegment(), and ThickSegment().

◆ SetColor()

◆ SetColorMode()

virtual void PLOTTER::SetColorMode ( bool  aColorMode)
inlinevirtual

◆ SetCreator()

◆ SetCurrentLineWidth()

◆ SetDash()

virtual void PLOTTER::SetDash ( PLOT_DASH_TYPE  dashed)
pure virtual

◆ SetGerberCoordinatesFormat()

virtual void PLOTTER::SetGerberCoordinatesFormat ( int  aResolution,
bool  aUseInches = false 
)
inlinevirtual

Reimplemented in GERBER_PLOTTER.

Definition at line 470 of file plotter.h.

471  {
472  // NOP for most plotters. Only for Gerber plotter
473  }

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), and initializePlotter().

◆ SetLayerPolarity()

virtual void PLOTTER::SetLayerPolarity ( bool  aPositive)
inlinevirtual

Set the current Gerber layer polarity to positive or negative by writing %LPD*% or %LPC*% to the Gerber file, respectively.

(obviously starts a new Gerber layer, too)

Parameters
aPositiveis the layer polarity and true for positive. It's not useful with most other plotter since they can't 'scratch' the film like photoplotter imagers do

Reimplemented in GERBER_PLOTTER.

Definition at line 456 of file plotter.h.

457  {
458  // NOP for most plotters
459  }

Referenced by PlotOneBoardLayer().

◆ SetNegative()

virtual void PLOTTER::SetNegative ( bool  aNegative)
inlinevirtual

Definition at line 142 of file plotter.h.

143  {
144  m_negativeMode = aNegative;
145  }
bool m_negativeMode
Definition: plotter.h:594

References m_negativeMode.

Referenced by FillNegativeKnockout().

◆ SetPageSettings()

◆ SetRenderSettings()

◆ SetSvgCoordinatesFormat()

virtual void PLOTTER::SetSvgCoordinatesFormat ( unsigned  aResolution,
bool  aUseInches = false 
)
inlinevirtual

Reimplemented in SVG_PLOTTER.

Definition at line 475 of file plotter.h.

476  {
477  // NOP for most plotters. Only for SVG plotter
478  }

Referenced by initializePlotter().

◆ SetTextMode()

virtual void PLOTTER::SetTextMode ( PLOT_TEXT_MODE  mode)
inlinevirtual

Change the current text mode.

See the PlotTextMode explanation at the beginning of the file.

Reimplemented in DXF_PLOTTER, and PSLIKE_PLOTTER.

Definition at line 465 of file plotter.h.

466  {
467  // NOP for most plotters.
468  }

Referenced by initializePlotter(), and PlotOneBoardLayer().

◆ SetTitle()

virtual void PLOTTER::SetTitle ( const wxString &  aTitle)
inlinevirtual

Definition at line 176 of file plotter.h.

176 { m_title = aTitle; }
wxString m_title
Definition: plotter.h:601

References m_title.

Referenced by DIALOG_PLOT_SCHEMATIC::createPDFFile().

◆ SetViewport()

virtual void PLOTTER::SetViewport ( const wxPoint &  aOffset,
double  aIusPerDecimil,
double  aScale,
bool  aMirror 
)
pure virtual

Set the plot offset and scaling for the current plot.

Parameters
aOffsetis the plot offset.
aIusPerDecimilgives the scaling factor from IUs to device units
aScaleis the user set plot scaling factor (either explicitly or using 'fit to A4').
aMirrorflips the plot in the Y direction (useful for toner transfers or some kind of film).

Implemented in SVG_PLOTTER, PDF_PLOTTER, PS_PLOTTER, HPGL_PLOTTER, DXF_PLOTTER, and GERBER_PLOTTER.

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), initializePlotter(), and DIALOG_PLOT_SCHEMATIC::setupPlotPagePDF().

◆ sketchOval()

void PLOTTER::sketchOval ( const wxPoint &  pos,
const wxSize &  size,
double  orient,
int  width 
)
protected

Definition at line 465 of file plotter.cpp.

466 {
467  SetCurrentLineWidth( width );
468  width = m_currentPenWidth;
469  int radius, deltaxy, cx, cy;
470  wxSize size( aSize );
471 
472  if( size.x > size.y )
473  {
474  std::swap( size.x, size.y );
475  orient = AddAngles( orient, 900 );
476  }
477 
478  deltaxy = size.y - size.x; /* distance between centers of the oval */
479  radius = ( size.x - width ) / 2;
480  cx = -radius;
481  cy = -deltaxy / 2;
482  RotatePoint( &cx, &cy, orient );
483  MoveTo( wxPoint( cx + pos.x, cy + pos.y ) );
484  cx = -radius;
485  cy = deltaxy / 2;
486  RotatePoint( &cx, &cy, orient );
487  FinishTo( wxPoint( cx + pos.x, cy + pos.y ) );
488 
489  cx = radius;
490  cy = -deltaxy / 2;
491  RotatePoint( &cx, &cy, orient );
492  MoveTo( wxPoint( cx + pos.x, cy + pos.y ) );
493  cx = radius;
494  cy = deltaxy / 2;
495  RotatePoint( &cx, &cy, orient );
496  FinishTo( wxPoint( cx + pos.x, cy + pos.y ) );
497 
498  cx = 0;
499  cy = deltaxy / 2;
500  RotatePoint( &cx, &cy, orient );
501  Arc( wxPoint( cx + pos.x, cy + pos.y ),
502  orient + 1800, orient + 3600,
503  radius, FILL_TYPE::NO_FILL );
504  cx = 0;
505  cy = -deltaxy / 2;
506  RotatePoint( &cx, &cy, orient );
507  Arc( wxPoint( cx + pos.x, cy + pos.y ),
508  orient, orient + 1800,
509  radius, FILL_TYPE::NO_FILL );
510 }
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
virtual void Arc(const wxPoint &centre, double StAngle, double EndAngle, int rayon, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)
Generic fallback: arc rendered as a polyline.
Definition: plotter.cpp:164
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:228
int m_currentPenWidth
Definition: plotter.h:595
T AddAngles(T a1, T2 a2)
Add two angles (keeping the result normalized). T2 is here.
Definition: trigo.h:335
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References AddAngles(), Arc(), FinishTo(), m_currentPenWidth, MoveTo(), NO_FILL, RotatePoint(), and SetCurrentLineWidth().

Referenced by PSLIKE_PLOTTER::FlashPadOval(), GERBER_PLOTTER::FlashPadOval(), HPGL_PLOTTER::FlashPadOval(), and DXF_PLOTTER::FlashPadOval().

◆ StartBlock()

virtual void PLOTTER::StartBlock ( void *  aData)
inlinevirtual

calling this function allows one to define the beginning of a group of drawing items, for instance in SVG or Gerber format.

(example: group all segments of a letter or a text)

Parameters
aDatacan define any parameter for most of plotters: do nothing

Reimplemented in SVG_PLOTTER, and GERBER_PLOTTER.

Definition at line 487 of file plotter.h.

487 {}

Referenced by SCH_SYMBOL::Plot(), BRDITEMS_PLOTTER::PlotFilledAreas(), and PlotStandardLayer().

◆ StartPlot()

virtual bool PLOTTER::StartPlot ( )
pure virtual

◆ Text()

void PLOTTER::Text ( const wxPoint &  aPos,
const COLOR4D aColor,
const wxString &  aText,
double  aOrient,
const wxSize &  aSize,
enum EDA_TEXT_HJUSTIFY_T  aH_justify,
enum EDA_TEXT_VJUSTIFY_T  aV_justify,
int  aPenWidth,
bool  aItalic,
bool  aBold,
bool  aMultilineAllowed = false,
void *  aData = nullptr 
)
virtual

Draw text with the plotter.

Same as GRText, but plot graphic text instead of draw it.

For convenience it accept the color to use for specific plotters (GERBER) aData is used to pass extra parameters.

Parameters
aPosis the text position (according to aH_justify, aV_justify).
aColoris the text color.
aTextis the text to draw.
aOrientis the angle in 0.1 degree.
aSizeis the text size (size.x or size.y can be < 0 for mirrored texts).
aH_justifyis the horizontal justification (Left, center, right).
aV_justifyis the vertical justification (bottom, center, top).
aPenWidthis the line width (if = 0, use plot default line width).
aItalicis the true to simulate an italic font.
aBolduse true to use a bold font Useful only with default width value (aWidth = 0).
aMultilineAlloweduse true to plot text as multiline, otherwise single line.
aDatais a parameter used by some plotters in SetCurrentLineWidth(), not directly used here.

Reimplemented in SVG_PLOTTER, PDF_PLOTTER, PS_PLOTTER, DXF_PLOTTER, and GERBER_PLOTTER.

Definition at line 217 of file gr_text.cpp.

229 {
230  SetColor( aColor );
231  SetCurrentLineWidth( aPenWidth, aData );
232 
233  GRText( NULL, aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify, aPenWidth,
234  aItalic, aBold, nullptr, nullptr, this );
235 }
#define NULL
virtual void SetColor(const COLOR4D &color)=0
void GRText(wxDC *aDC, const wxPoint &aPos, COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, void(*aCallback)(int x0, int y0, int xf, int yf, void *aData), void *aCallbackData, PLOTTER *aPlotter)
Draw a graphic text (like footprint texts).
Definition: gr_text.cpp:130
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References GRText(), NULL, SetColor(), and SetCurrentLineWidth().

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), LIB_TEXT::Plot(), LIB_FIELD::Plot(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), PlotDrawingSheet(), BRDITEMS_PLOTTER::PlotFootprintTextItem(), BRDITEMS_PLOTTER::PlotPcbText(), LIB_PIN::PlotPinTexts(), GERBER_PLOTTER::Text(), DXF_PLOTTER::Text(), PS_PLOTTER::Text(), PDF_PLOTTER::Text(), and SVG_PLOTTER::Text().

◆ ThickArc()

void PLOTTER::ThickArc ( const wxPoint &  centre,
double  StAngle,
double  EndAngle,
int  rayon,
int  width,
OUTLINE_MODE  tracemode,
void *  aData 
)
virtual

Reimplemented in GERBER_PLOTTER.

Definition at line 537 of file plotter.cpp.

539 {
540  if( tracemode == FILLED )
541  Arc( centre, StAngle, EndAngle, radius, FILL_TYPE::NO_FILL, width );
542  else
543  {
544  SetCurrentLineWidth( -1 );
545  Arc( centre, StAngle, EndAngle,
546  radius - ( width - m_currentPenWidth ) / 2, FILL_TYPE::NO_FILL, -1 );
547  Arc( centre, StAngle, EndAngle,
548  radius + ( width - m_currentPenWidth ) / 2, FILL_TYPE::NO_FILL, -1 );
549  }
550 }
virtual void Arc(const wxPoint &centre, double StAngle, double EndAngle, int rayon, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)
Generic fallback: arc rendered as a polyline.
Definition: plotter.cpp:164
int m_currentPenWidth
Definition: plotter.h:595
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References Arc(), FILLED, m_currentPenWidth, NO_FILL, and SetCurrentLineWidth().

Referenced by BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), BRDITEMS_PLOTTER::PlotPcbShape(), and PlotStandardLayer().

◆ ThickCircle()

void PLOTTER::ThickCircle ( const wxPoint &  pos,
int  diametre,
int  width,
OUTLINE_MODE  tracemode,
void *  aData 
)
virtual

Reimplemented in GERBER_PLOTTER.

Definition at line 575 of file plotter.cpp.

577 {
578  if( tracemode == FILLED )
579  {
580  Circle( pos, diametre, FILL_TYPE::NO_FILL, width );
581  }
582  else
583  {
584  SetCurrentLineWidth( -1 );
585  Circle( pos, diametre - width + m_currentPenWidth, FILL_TYPE::NO_FILL, -1 );
586  Circle( pos, diametre + width - m_currentPenWidth, FILL_TYPE::NO_FILL, -1 );
587  }
588 }
int m_currentPenWidth
Definition: plotter.h:595
virtual void Circle(const wxPoint &pos, int diametre, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References Circle(), FILLED, m_currentPenWidth, NO_FILL, and SetCurrentLineWidth().

Referenced by BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), and BRDITEMS_PLOTTER::PlotPcbShape().

◆ ThickRect()

void PLOTTER::ThickRect ( const wxPoint &  p1,
const wxPoint &  p2,
int  width,
OUTLINE_MODE  tracemode,
void *  aData 
)
virtual

Reimplemented in GERBER_PLOTTER.

Definition at line 553 of file plotter.cpp.

555 {
556  if( tracemode == FILLED )
557  Rect( p1, p2, FILL_TYPE::NO_FILL, width );
558  else
559  {
560  SetCurrentLineWidth( -1 );
561  wxPoint offsetp1( p1.x - (width - m_currentPenWidth) / 2,
562  p1.y - (width - m_currentPenWidth) / 2 );
563  wxPoint offsetp2( p2.x + (width - m_currentPenWidth) / 2,
564  p2.y + (width - m_currentPenWidth) / 2 );
565  Rect( offsetp1, offsetp2, FILL_TYPE::NO_FILL, -1 );
566  offsetp1.x += (width - m_currentPenWidth);
567  offsetp1.y += (width - m_currentPenWidth);
568  offsetp2.x -= (width - m_currentPenWidth);
569  offsetp2.y -= (width - m_currentPenWidth);
570  Rect( offsetp1, offsetp2, FILL_TYPE::NO_FILL, -1 );
571  }
572 }
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
int m_currentPenWidth
Definition: plotter.h:595
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References FILLED, m_currentPenWidth, NO_FILL, Rect(), and SetCurrentLineWidth().

◆ ThickSegment()

void PLOTTER::ThickSegment ( const wxPoint &  start,
const wxPoint &  end,
int  width,
OUTLINE_MODE  tracemode,
void *  aData 
)
virtual

Reimplemented in DXF_PLOTTER, HPGL_PLOTTER, and GERBER_PLOTTER.

Definition at line 513 of file plotter.cpp.

515 {
516  if( tracemode == FILLED )
517  {
518  if( start == end )
519  {
520  Circle( start, width, FILL_TYPE::FILLED_SHAPE, 0 );
521  }
522  else
523  {
524  SetCurrentLineWidth( width );
525  MoveTo( start );
526  FinishTo( end );
527  }
528  }
529  else
530  {
531  SetCurrentLineWidth( -1 );
532  segmentAsOval( start, end, width, tracemode );
533  }
534 }
void segmentAsOval(const wxPoint &start, const wxPoint &end, int width, OUTLINE_MODE tracemode)
Convert a thick segment and plot it as an oval.
Definition: plotter.cpp:444
void FinishTo(const wxPoint &pos)
Definition: plotter.h:273
virtual void Circle(const wxPoint &pos, int diametre, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
void MoveTo(const wxPoint &pos)
Definition: plotter.h:263
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.

References Circle(), FILLED, FILLED_SHAPE, FinishTo(), MoveTo(), segmentAsOval(), and SetCurrentLineWidth().

Referenced by PSLIKE_PLOTTER::FlashPadOval(), BRDITEMS_PLOTTER::PlotFilledAreas(), BRDITEMS_PLOTTER::PlotFootprintGraphicItem(), PlotLayerOutlines(), BRDITEMS_PLOTTER::PlotPcbShape(), and PlotStandardLayer().

◆ userToDeviceCoordinates()

DPOINT PLOTTER::userToDeviceCoordinates ( const wxPoint &  aCoordinate)
protectedvirtual

Modify coordinates according to the orientation, scale factor, and offsets trace.

Also convert from a wxPoint to DPOINT, since some output engines needs floating point coordinates.

Definition at line 93 of file plotter.cpp.

94 {
95  wxPoint pos = aCoordinate - m_plotOffset;
96 
97  // Don't allow overflows; they can cause rendering failures in some file viewers
98  // (such as Acrobat)
99  int clampSize = MAX_PAGE_SIZE_MILS * m_IUsPerDecimil * 10 / 2;
100  pos.x = std::max( -clampSize, std::min( pos.x, clampSize ) );
101  pos.y = std::max( -clampSize, std::min( pos.y, clampSize ) );
102 
103  double x = pos.x * m_plotScale;
104  double y = ( m_paperSize.y - pos.y * m_plotScale );
105 
106  if( m_plotMirror )
107  {
109  x = ( m_paperSize.x - pos.x * m_plotScale );
110  else
111  y = pos.y * m_plotScale;
112  }
113 
114  if( m_yaxisReversed )
115  y = m_paperSize.y - y;
116 
117  x *= m_iuPerDeviceUnit;
118  y *= m_iuPerDeviceUnit;
119 
120  return DPOINT( x, y );
121 }
double m_iuPerDeviceUnit
Definition: plotter.h:581
double m_IUsPerDecimil
Definition: plotter.h:579
double m_plotScale
Plot scale - chosen by the user (even implicitly with 'fit in a4')
Definition: plotter.h:573
bool m_yaxisReversed
Definition: plotter.h:587
bool m_plotMirror
Definition: plotter.h:584
wxPoint m_plotOffset
Definition: plotter.h:583
#define MAX_PAGE_SIZE_MILS
Definition: page_info.h:41
VECTOR2< double > DPOINT
Definition: vector2d.h:628
wxSize m_paperSize
Definition: plotter.h:603
bool m_mirrorIsHorizontal
Definition: plotter.h:586

References m_iuPerDeviceUnit, m_IUsPerDecimil, m_mirrorIsHorizontal, m_paperSize, m_plotMirror, m_plotOffset, m_plotScale, m_yaxisReversed, and MAX_PAGE_SIZE_MILS.

Referenced by DXF_PLOTTER::Arc(), HPGL_PLOTTER::Arc(), PS_PLOTTER::Arc(), PDF_PLOTTER::Arc(), SVG_PLOTTER::Arc(), SVG_PLOTTER::BezierCurve(), HPGL_PLOTTER::Circle(), DXF_PLOTTER::Circle(), PS_PLOTTER::Circle(), PDF_PLOTTER::Circle(), SVG_PLOTTER::Circle(), PSLIKE_PLOTTER::computeTextParameters(), GERBER_PLOTTER::FlashPadChamferRoundRect(), GERBER_PLOTTER::FlashPadCircle(), HPGL_PLOTTER::FlashPadCircle(), GERBER_PLOTTER::FlashPadCustom(), GERBER_PLOTTER::FlashPadOval(), GERBER_PLOTTER::FlashPadRect(), GERBER_PLOTTER::FlashPadRoundRect(), GERBER_PLOTTER::FlashPadTrapez(), GERBER_PLOTTER::FlashRegularPolygon(), GERBER_PLOTTER::PenTo(), DXF_PLOTTER::PenTo(), HPGL_PLOTTER::PenTo(), PS_PLOTTER::PenTo(), PDF_PLOTTER::PenTo(), SVG_PLOTTER::PenTo(), GERBER_PLOTTER::plotArc(), PS_PLOTTER::PlotImage(), PDF_PLOTTER::PlotImage(), HPGL_PLOTTER::PlotPoly(), PS_PLOTTER::PlotPoly(), PDF_PLOTTER::PlotPoly(), SVG_PLOTTER::PlotPoly(), HPGL_PLOTTER::Rect(), PS_PLOTTER::Rect(), PDF_PLOTTER::Rect(), SVG_PLOTTER::Rect(), DXF_PLOTTER::Text(), PS_PLOTTER::Text(), and SVG_PLOTTER::Text().

◆ userToDeviceSize() [1/2]

◆ userToDeviceSize() [2/2]

double PLOTTER::userToDeviceSize ( double  size) const
protectedvirtual

Modify size according to the plotter scale factors (simple double version).

Definition at line 131 of file plotter.cpp.

132 {
133  return size * m_plotScale * m_iuPerDeviceUnit;
134 }
double m_iuPerDeviceUnit
Definition: plotter.h:581
double m_plotScale
Plot scale - chosen by the user (even implicitly with 'fit in a4')
Definition: plotter.h:573

References m_iuPerDeviceUnit, and m_plotScale.

Member Data Documentation

◆ DO_NOT_SET_LINE_WIDTH

◆ m_colorMode

bool PLOTTER::m_colorMode
protected

◆ m_creator

wxString PLOTTER::m_creator
protected

◆ m_currentPenWidth

◆ m_filename

wxString PLOTTER::m_filename
protected

◆ m_headerExtraLines

wxArrayString PLOTTER::m_headerExtraLines
protected

Definition at line 605 of file plotter.h.

Referenced by AddLineToHeader(), ClearHeaderLinesList(), and GERBER_PLOTTER::StartPlot().

◆ m_iuPerDeviceUnit

◆ m_IUsPerDecimil

◆ m_mirrorIsHorizontal

bool PLOTTER::m_mirrorIsHorizontal
protected

Definition at line 586 of file plotter.h.

Referenced by PS_PLOTTER::Arc(), SVG_PLOTTER::Arc(), PLOTTER(), and userToDeviceCoordinates().

◆ m_negativeMode

bool PLOTTER::m_negativeMode
protected

Definition at line 594 of file plotter.h.

Referenced by PLOTTER(), PSLIKE_PLOTTER::SetColor(), and SetNegative().

◆ m_outputFile

FILE* PLOTTER::m_outputFile
protected

Output file.

Definition at line 590 of file plotter.h.

Referenced by DXF_PLOTTER::Arc(), HPGL_PLOTTER::Arc(), PS_PLOTTER::Arc(), SVG_PLOTTER::Arc(), SVG_PLOTTER::BezierCurve(), HPGL_PLOTTER::Circle(), DXF_PLOTTER::Circle(), PS_PLOTTER::Circle(), SVG_PLOTTER::Circle(), GERBER_PLOTTER::ClearAllAttributes(), GERBER_PLOTTER::clearNetAttribute(), PDF_PLOTTER::ClosePage(), PDF_PLOTTER::closePdfObject(), PDF_PLOTTER::closePdfStream(), GERBER_PLOTTER::emitDcode(), PS_PLOTTER::emitSetRGBColor(), SVG_PLOTTER::EndBlock(), GERBER_PLOTTER::EndPlot(), DXF_PLOTTER::EndPlot(), HPGL_PLOTTER::EndPlot(), PS_PLOTTER::EndPlot(), PDF_PLOTTER::EndPlot(), SVG_PLOTTER::EndPlot(), DXF_PLOTTER::FlashPadCircle(), HPGL_PLOTTER::FlashPadCircle(), PSLIKE_PLOTTER::FlashPadOval(), GERBER_PLOTTER::FlashPadOval(), HPGL_PLOTTER::FlashPadOval(), DXF_PLOTTER::FlashPadOval(), GERBER_PLOTTER::FlashPadRect(), DXF_PLOTTER::FlashPadRect(), GERBER_PLOTTER::FlashPadRoundRect(), DXF_PLOTTER::FlashPadTrapez(), GERBER_PLOTTER::formatNetAttribute(), OpenFile(), PDF_PLOTTER::OpenFile(), GERBER_PLOTTER::PenTo(), DXF_PLOTTER::PenTo(), HPGL_PLOTTER::PenTo(), PS_PLOTTER::PenTo(), SVG_PLOTTER::PenTo(), GERBER_PLOTTER::plotArc(), GERBER_PLOTTER::PlotGerberRegion(), PS_PLOTTER::PlotImage(), SVG_PLOTTER::PlotImage(), GERBER_PLOTTER::PlotPoly(), PS_PLOTTER::PlotPoly(), SVG_PLOTTER::PlotPoly(), GERBER_PLOTTER::plotRoundRectAsRegion(), PLOTTER(), DXF_PLOTTER::Rect(), HPGL_PLOTTER::Rect(), PS_PLOTTER::Rect(), SVG_PLOTTER::Rect(), GERBER_PLOTTER::selectAperture(), PS_PLOTTER::SetCurrentLineWidth(), PS_PLOTTER::SetDash(), GERBER_PLOTTER::SetLayerPolarity(), SVG_PLOTTER::setSVGPlotStyle(), PS_PLOTTER::SetViewport(), SVG_PLOTTER::StartBlock(), PDF_PLOTTER::StartPage(), PDF_PLOTTER::startPdfObject(), PDF_PLOTTER::startPdfStream(), GERBER_PLOTTER::StartPlot(), HPGL_PLOTTER::StartPlot(), DXF_PLOTTER::StartPlot(), PS_PLOTTER::StartPlot(), PDF_PLOTTER::StartPlot(), SVG_PLOTTER::StartPlot(), DXF_PLOTTER::Text(), PS_PLOTTER::Text(), SVG_PLOTTER::Text(), HPGL_PLOTTER::ThickSegment(), GERBER_PLOTTER::writeApertureList(), and ~PLOTTER().

◆ m_pageInfo

◆ m_paperSize

◆ m_penLastpos

wxPoint PLOTTER::m_penLastpos
protected

◆ m_penState

char PLOTTER::m_penState
protected

◆ m_plotMirror

◆ m_plotOffset

◆ m_plotScale

◆ m_renderSettings

◆ m_title

wxString PLOTTER::m_title
protected

Definition at line 601 of file plotter.h.

Referenced by PDF_PLOTTER::EndPlot(), SetTitle(), and PS_PLOTTER::StartPlot().

◆ m_yaxisReversed

bool PLOTTER::m_yaxisReversed
protected

◆ MARKER_COUNT

const unsigned PLOTTER::MARKER_COUNT = 58
static

Draw a marker (used for the drill map).

Definition at line 436 of file plotter.h.

Referenced by Marker().

◆ USE_DEFAULT_LINE_WIDTH


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