KiCad PCB EDA Suite
plotter.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2016-2022 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
31#ifndef PLOT_COMMON_H_
32#define PLOT_COMMON_H_
33
34#include <eda_shape.h>
35#include <vector>
36#include <math/box2.h>
37#include <gr_text.h>
38#include <page_info.h>
39#include <outline_mode.h>
40#include <gal/color4d.h>
41#include <stroke_params.h>
42#include <render_settings.h>
43
44
45class COLOR_SETTINGS;
46class SHAPE_ARC;
47class SHAPE_POLY_SET;
50class PROJECT;
51
53
54
55// Must be in the same order as the drop-down list in the plot dialog inside pcbnew
56// Units (inch/mm for DXF plotter
57enum class DXF_UNITS
58{
59 INCHES = 0,
60 MILLIMETERS = 1
61};
62
63
69enum class PLOT_FORMAT
70{
71 UNDEFINED = -1,
72 FIRST_FORMAT = 0,
74 GERBER,
75 POST,
76 DXF,
77 PDF,
78 SVG,
80};
81
96{
97 STROKE,
98 NATIVE,
99 PHANTOM,
100 DEFAULT
101};
102
110{
111public:
112 // These values are used as flag for pen or aperture selection
113 static const int DO_NOT_SET_LINE_WIDTH = -2; // Skip selection
114 static const int USE_DEFAULT_LINE_WIDTH = -1; // use the default pen
115
116 PLOTTER();
117
118 virtual ~PLOTTER();
119
125 virtual PLOT_FORMAT GetPlotterType() const = 0;
126
127 virtual bool StartPlot( const wxString& aPageNumber ) = 0;
128 virtual bool EndPlot() = 0;
129
130 virtual void SetNegative( bool aNegative ) { m_negativeMode = aNegative; }
131
137 virtual void SetColorMode( bool aColorMode ) { m_colorMode = aColorMode; }
138 bool GetColorMode() const { return m_colorMode; }
139
140 void SetRenderSettings( RENDER_SETTINGS* aSettings ) { m_renderSettings = aSettings; }
142
143 virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_pageInfo = aPageSettings; }
145
152 virtual void SetCurrentLineWidth( int width, void* aData = nullptr ) = 0;
153 virtual int GetCurrentLineWidth() const { return m_currentPenWidth; }
154
155 virtual void SetColor( const COLOR4D& color ) = 0;
156
157 virtual void SetDash( int aLineWidth, PLOT_DASH_TYPE aLineStyle ) = 0;
158
159 virtual void SetCreator( const wxString& aCreator ) { m_creator = aCreator; }
160
161 virtual void SetTitle( const wxString& aTitle ) { m_title = aTitle; }
162
168 void AddLineToHeader( const wxString& aExtraString )
169 {
170 m_headerExtraLines.Add( aExtraString );
171 }
172
177 {
178 m_headerExtraLines.Clear();
179 }
180
191 virtual void SetViewport( const VECTOR2I& aOffset, double aIusPerDecimil,
192 double aScale, bool aMirror ) = 0;
193
203 virtual bool OpenFile( const wxString& aFullFilename );
204
210 double GetIUsPerDecimil() const { return m_IUsPerDecimil; }
211
212 int GetPlotterArcLowDef() const { return m_IUsPerDecimil * 8; }
213 int GetPlotterArcHighDef() const { return m_IUsPerDecimil * 2; }
214
215 // Low level primitives
216 virtual void Rect( const VECTOR2I& p1, const VECTOR2I& p2, FILL_T fill,
217 int width = USE_DEFAULT_LINE_WIDTH ) = 0;
218 virtual void Circle( const VECTOR2I& pos, int diametre, FILL_T fill,
219 int width = USE_DEFAULT_LINE_WIDTH ) = 0;
220
224 virtual void Arc( const VECTOR2I& aCenter, const VECTOR2I& aStart, const VECTOR2I& aEnd,
225 FILL_T aFill, int aWidth, int aMaxError );
226
232 virtual void BezierCurve( const VECTOR2I& aStart, const VECTOR2I& aControl1,
233 const VECTOR2I& aControl2, const VECTOR2I& aEnd,
234 int aTolerance, int aLineThickness = USE_DEFAULT_LINE_WIDTH );
235
244 virtual void PenTo( const VECTOR2I& pos, char plume ) = 0;
245
246 // Convenience functions for PenTo
247 void MoveTo( const VECTOR2I& pos )
248 {
249 PenTo( pos, 'U' );
250 }
251
252 void LineTo( const VECTOR2I& pos )
253 {
254 PenTo( pos, 'D' );
255 }
256
257 void FinishTo( const VECTOR2I& pos )
258 {
259 PenTo( pos, 'D' );
260 PenTo( pos, 'Z' );
261 }
262
264 {
265 // The point is not important with Z motion
266 PenTo( VECTOR2I( 0, 0 ), 'Z' );
267 }
268
277 virtual void PlotPoly( const std::vector<VECTOR2I>& aCornerList, FILL_T aFill,
278 int aWidth = USE_DEFAULT_LINE_WIDTH, void* aData = nullptr ) = 0;
279
288 virtual void PlotPoly( const SHAPE_LINE_CHAIN& aCornerList, FILL_T aFill,
289 int aWidth = USE_DEFAULT_LINE_WIDTH, void* aData = nullptr );
290
301 virtual void PlotImage( const wxImage& aImage, const VECTOR2I& aPos, double aScaleFactor );
302
303 // Higher level primitives -- can be drawn as line, sketch or 'filled'
304 virtual void ThickSegment( const VECTOR2I& start, const VECTOR2I& end, int width,
305 OUTLINE_MODE tracemode, void* aData );
306
307 virtual void ThickArc( const VECTOR2I& aCentre, const VECTOR2I& aStart,
308 const VECTOR2I& aEnd, int aWidth,
309 OUTLINE_MODE aTraceMode, void* aData );
310
311 virtual void ThickArc( const EDA_SHAPE& aArcShape,
312 OUTLINE_MODE aTraceMode, void* aData );
313
314 virtual void ThickRect( const VECTOR2I& p1, const VECTOR2I& p2, int width, OUTLINE_MODE tracemode,
315 void* aData );
316
317 virtual void ThickCircle( const VECTOR2I& pos, int diametre, int width, OUTLINE_MODE tracemode,
318 void* aData );
319
320 virtual void FilledCircle( const VECTOR2I& pos, int diametre, OUTLINE_MODE tracemode,
321 void* aData );
322
323
324 // Flash primitives
325
332 virtual void FlashPadCircle( const VECTOR2I& aPadPos, int aDiameter, OUTLINE_MODE aTraceMode,
333 void* aData ) = 0;
334
342 virtual void FlashPadOval( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
343 const EDA_ANGLE& aPadOrient, OUTLINE_MODE aTraceMode,
344 void* aData ) = 0;
345
353 virtual void FlashPadRect( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
354 const EDA_ANGLE& aPadOrient, OUTLINE_MODE aTraceMode,
355 void* aData ) = 0;
356
365 virtual void FlashPadRoundRect( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
366 int aCornerRadius, const EDA_ANGLE& aOrient,
367 OUTLINE_MODE aTraceMode, void* aData ) = 0;
368
377 virtual void FlashPadCustom( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
378 const EDA_ANGLE& aPadOrient, SHAPE_POLY_SET* aPolygons,
379 OUTLINE_MODE aTraceMode, void* aData ) = 0;
380
391 virtual void FlashPadTrapez( const VECTOR2I& aPadPos, const VECTOR2I* aCorners,
392 const EDA_ANGLE& aPadOrient, OUTLINE_MODE aTraceMode,
393 void* aData ) = 0;
394
405 virtual void FlashRegularPolygon( const VECTOR2I& aShapePos, int aDiameter, int aCornerCount,
406 const EDA_ANGLE& aOrient, OUTLINE_MODE aTraceMode,
407 void* aData ) = 0;
408
415 virtual void Text( const VECTOR2I& aPos,
416 const COLOR4D& aColor,
417 const wxString& aText,
418 const EDA_ANGLE& aOrient,
419 const VECTOR2I& aSize,
420 enum GR_TEXT_H_ALIGN_T aH_justify,
421 enum GR_TEXT_V_ALIGN_T aV_justify,
422 int aPenWidth,
423 bool aItalic,
424 bool aBold,
425 bool aMultilineAllowed,
426 KIFONT::FONT* aFont,
427 void* aData = nullptr );
428
435 virtual void HyperlinkBox( const BOX2I& aBox, const wxString& aDestinationURL )
436 {
437 // NOP for most plotters.
438 }
439
446 virtual void HyperlinkMenu( const BOX2I& aBox, const std::vector<wxString>& aDestURLs )
447 {
448 // NOP for most plotters.
449 }
450
457 virtual void Bookmark( const BOX2I& aBox, const wxString& aName,
458 const wxString& aGroupName = wxEmptyString )
459 {
460 // NOP for most plotters.
461 }
462
466 static const unsigned MARKER_COUNT = 58;
467
475 void Marker( const VECTOR2I& position, int diametre, unsigned aShapeId );
476
486 virtual void SetLayerPolarity( bool aPositive )
487 {
488 // NOP for most plotters
489 }
490
495 virtual void SetTextMode( PLOT_TEXT_MODE mode )
496 {
497 // NOP for most plotters.
498 }
499
500 virtual void SetGerberCoordinatesFormat( int aResolution, bool aUseInches = false )
501 {
502 // NOP for most plotters. Only for Gerber plotter
503 }
504
506 virtual void SetSvgCoordinatesFormat( unsigned aPrecision )
507 {
508 // NOP for most plotters. Only for SVG plotter
509 }
510
518 virtual void StartBlock( void* aData ) {}
519
527 virtual void EndBlock( void* aData ) {}
528
529
530protected:
534 virtual void Arc( const VECTOR2I& aCentre, const EDA_ANGLE& aStartAngle,
535 const EDA_ANGLE& aEndAngle, int aRadius, FILL_T aFill,
536 int aWidth = USE_DEFAULT_LINE_WIDTH );
537
538 virtual void ThickArc( const VECTOR2I& aCentre, const EDA_ANGLE& StAngle,
539 const EDA_ANGLE& EndAngle, int aRadius, int aWidth,
540 OUTLINE_MODE aTraceMode, void* aData );
541
542 // These are marker subcomponents
546 void markerCircle( const VECTOR2I& pos, int radius );
547
551 void markerHBar( const VECTOR2I& pos, int radius );
552
556 void markerSlash( const VECTOR2I& pos, int radius );
557
561 void markerBackSlash( const VECTOR2I& pos, int radius );
562
566 void markerVBar( const VECTOR2I& pos, int radius );
567
571 void markerSquare( const VECTOR2I& position, int radius );
572
576 void markerLozenge( const VECTOR2I& position, int radius );
577
578 // Helper function for sketched filler segment
579
583 void segmentAsOval( const VECTOR2I& start, const VECTOR2I& end, int width,
584 OUTLINE_MODE tracemode );
585
586 void sketchOval( const VECTOR2I& aPos, const VECTOR2I& aSize, const EDA_ANGLE& aOrient,
587 int aWidth );
588
589 // Coordinate and scaling conversion functions
590
596 virtual VECTOR2D userToDeviceCoordinates( const VECTOR2I& aCoordinate );
597
601 virtual VECTOR2D userToDeviceSize( const VECTOR2I& size );
602
606 virtual double userToDeviceSize( double size ) const;
607
608 double GetDotMarkLenIU( int aLineWidth ) const;
609
610 double GetDashMarkLenIU( int aLineWidth ) const;
611
612 double GetDashGapLenIU( int aLineWidth ) const;
613
614protected: // variables used in most of plotters:
617
618 /* Caller scale (how many IUs in a decimil - always); it's a double
619 * because in Eeschema there are 0.1 IUs in a decimil (Eeschema
620 * always works in mils internally) while PcbNew can work in decimil
621 * or nanometers, so this value would be >= 1 */
623
624 double m_iuPerDeviceUnit; // Device scale (from IUs to plotter device units;
625 // usually decimils)
626 VECTOR2I m_plotOffset; // Plot offset (in IUs)
627 bool m_plotMirror; // X axis orientation (SVG)
628 // and plot mirrored (only for PS, PDF HPGL and SVG)
629 bool m_mirrorIsHorizontal; // true to mirror horizontally (else vertically)
630 bool m_yaxisReversed; // true if the Y axis is top to bottom (SVG)
631
634
635 // Pen handling
636 bool m_colorMode; // true to plot in color, otherwise black & white
637 bool m_negativeMode; // true to generate a negative image (PS mode mainly)
639 char m_penState; // current pen state: 'U', 'D' or 'Z' (see PenTo)
640 VECTOR2I m_penLastpos; // last pen position; -1,-1 when pen is at rest
641
642 wxString m_creator;
643 wxString m_filename;
644 wxString m_title;
646 VECTOR2I m_paperSize; // Paper size in IU - not in mils
647
648 wxArrayString m_headerExtraLines; // a set of string to print in header file
649
651};
652
653
654class TITLE_BLOCK;
655
656void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
657 const PAGE_INFO& aPageInfo, const std::map<wxString, wxString>*aProperties,
658 const wxString& aSheetNumber, int aSheetCount, const wxString& aSheetName,
659 const wxString& aSheetPath, const wxString& aFilename,
660 COLOR4D aColor = COLOR4D::UNSPECIFIED, bool aIsFirstPage = true );
661
664wxString GetDefaultPlotExtension( PLOT_FORMAT aFormat );
665
666
667#endif // PLOT_COMMON_H_
int color
Definition: DXF_plotter.cpp:57
Color settings are a bit different than most of the settings objects in that there can be more than o...
Information which can be added in a gerber file as attribute of an object.
FONT is an abstract base class for both outline and stroke fonts.
Definition: font.h:105
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
Base plotter engine class.
Definition: plotter.h:110
double GetDotMarkLenIU(int aLineWidth) const
Definition: plotter.cpp:131
virtual void ThickSegment(const VECTOR2I &start, const VECTOR2I &end, int width, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:549
virtual void SetDash(int aLineWidth, PLOT_DASH_TYPE aLineStyle)=0
virtual void PlotImage(const wxImage &aImage, const VECTOR2I &aPos, double aScaleFactor)
Only PostScript plotters can plot bitmaps.
Definition: plotter.cpp:254
virtual void ThickRect(const VECTOR2I &p1, const VECTOR2I &p2, int width, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:628
wxArrayString m_headerExtraLines
Definition: plotter.h:648
virtual void ThickCircle(const VECTOR2I &pos, int diametre, int width, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:652
static const unsigned MARKER_COUNT
Draw a marker (used for the drill map).
Definition: plotter.h:466
double GetDashGapLenIU(int aLineWidth) const
Definition: plotter.cpp:143
virtual void Circle(const VECTOR2I &pos, int diametre, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition: plotter.cpp:74
bool m_mirrorIsHorizontal
Definition: plotter.h:629
virtual void SetNegative(bool aNegative)
Definition: plotter.h:130
virtual void SetSvgCoordinatesFormat(unsigned aPrecision)
Set the number of digits for mantissa in coordinates in mm for SVG plotter.
Definition: plotter.h:506
PLOTTER()
Definition: plotter.cpp:47
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 SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: plotter.h:143
void SetRenderSettings(RENDER_SETTINGS *aSettings)
Definition: plotter.h:140
PAGE_INFO m_pageInfo
Definition: plotter.h:645
bool m_plotMirror
Definition: plotter.h:627
virtual void FilledCircle(const VECTOR2I &pos, int diametre, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:668
static const int USE_DEFAULT_LINE_WIDTH
Definition: plotter.h:114
virtual void SetTitle(const wxString &aTitle)
Definition: plotter.h:161
virtual bool EndPlot()=0
void MoveTo(const VECTOR2I &pos)
Definition: plotter.h:247
virtual void Arc(const VECTOR2I &aCenter, const VECTOR2I &aStart, const VECTOR2I &aEnd, FILL_T aFill, int aWidth, int aMaxError)
Generic fallback: arc rendered as a polyline.
Definition: plotter.cpp:149
void markerSlash(const VECTOR2I &pos, int radius)
Plot a / bar centered on the position.
Definition: plotter.cpp:338
void FinishTo(const VECTOR2I &pos)
Definition: plotter.h:257
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
bool m_yaxisReversed
Definition: plotter.h:630
virtual bool StartPlot(const wxString &aPageNumber)=0
double m_iuPerDeviceUnit
Definition: plotter.h:624
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:141
VECTOR2I m_plotOffset
Definition: plotter.h:626
VECTOR2I m_penLastpos
Definition: plotter.h:640
virtual VECTOR2D userToDeviceCoordinates(const VECTOR2I &aCoordinate)
Modify coordinates according to the orientation, scale factor, and offsets trace.
Definition: plotter.cpp:90
virtual ~PLOTTER()
Definition: plotter.cpp:66
double GetIUsPerDecimil() const
The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establ...
Definition: plotter.h:210
virtual void SetGerberCoordinatesFormat(int aResolution, bool aUseInches=false)
Definition: plotter.h:500
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
VECTOR2I m_paperSize
Definition: plotter.h:646
virtual VECTOR2D userToDeviceSize(const VECTOR2I &size)
Modify size according to the plotter scale factors (VECTOR2I version, returns a VECTOR2D).
Definition: plotter.cpp:115
void sketchOval(const VECTOR2I &aPos, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, int aWidth)
Definition: plotter.cpp:496
virtual void Bookmark(const BOX2I &aBox, const wxString &aName, const wxString &aGroupName=wxEmptyString)
Create a bookmark to a symbol.
Definition: plotter.h:457
virtual PLOT_FORMAT GetPlotterType() const =0
Returns the effective plot engine in use.
virtual void SetTextMode(PLOT_TEXT_MODE mode)
Change the current text mode.
Definition: plotter.h:495
int GetPlotterArcHighDef() const
Definition: plotter.h:213
char m_penState
Definition: plotter.h:639
void Marker(const VECTOR2I &position, int diametre, unsigned aShapeId)
Draw a pattern shape number aShapeId, to coord position.
Definition: plotter.cpp:359
wxString m_creator
Definition: plotter.h:642
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:159
void markerHBar(const VECTOR2I &pos, int radius)
Plot a - bar centered on the position.
Definition: plotter.cpp:331
int m_currentPenWidth
Definition: plotter.h:638
virtual void HyperlinkBox(const BOX2I &aBox, const wxString &aDestinationURL)
Create a clickable hyperlink with a rectangular click area.
Definition: plotter.h:435
double m_plotScale
Plot scale - chosen by the user (even implicitly with 'fit in a4')
Definition: plotter.h:616
void ClearHeaderLinesList()
Remove all lines from the list of free lines to print at the beginning of the file.
Definition: plotter.h:176
void markerCircle(const VECTOR2I &pos, int radius)
Plot a circle centered on the position.
Definition: plotter.cpp:298
virtual void FlashPadCircle(const VECTOR2I &aPadPos, int aDiameter, OUTLINE_MODE aTraceMode, void *aData)=0
bool GetColorMode() const
Definition: plotter.h:138
PAGE_INFO & PageSettings()
Definition: plotter.h:144
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror)=0
Set the plot offset and scaling for the current plot.
void AddLineToHeader(const wxString &aExtraString)
Add a line to the list of free lines to print at the beginning of the file.
Definition: plotter.h:168
FILE * m_outputFile
Output file.
Definition: plotter.h:633
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition: plotter.h:137
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
void LineTo(const VECTOR2I &pos)
Definition: plotter.h:252
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 PenTo(const VECTOR2I &pos, char plume)=0
Moveto/lineto primitive, moves the 'pen' to the specified direction.
virtual void FlashRegularPolygon(const VECTOR2I &aShapePos, int aDiameter, int aCornerCount, const EDA_ANGLE &aOrient, OUTLINE_MODE aTraceMode, void *aData)=0
Flash a regular polygon.
void PenFinish()
Definition: plotter.h:263
static const int DO_NOT_SET_LINE_WIDTH
Definition: plotter.h:113
void markerLozenge(const VECTOR2I &position, int radius)
Plot a lozenge centered on the position.
Definition: plotter.cpp:304
RENDER_SETTINGS * m_renderSettings
Definition: plotter.h:650
void markerBackSlash(const VECTOR2I &pos, int radius)
Plot a \ bar centered on the position.
Definition: plotter.cpp:345
virtual void FlashPadOval(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
int GetPlotterArcLowDef() const
Definition: plotter.h:212
void segmentAsOval(const VECTOR2I &start, const VECTOR2I &end, int width, OUTLINE_MODE tracemode)
Convert a thick segment and plot it as an oval.
Definition: plotter.cpp:481
virtual void FlashPadTrapez(const VECTOR2I &aPadPos, const VECTOR2I *aCorners, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
Flash a trapezoidal pad.
bool m_negativeMode
Definition: plotter.h:637
virtual void HyperlinkMenu(const BOX2I &aBox, const std::vector< wxString > &aDestURLs)
Create a clickable hyperlink menu with a rectangular click area.
Definition: plotter.h:446
virtual void SetLayerPolarity(bool aPositive)
Set the current Gerber layer polarity to positive or negative by writing %LPD*% or %LPC*% to the Gerb...
Definition: plotter.h:486
double m_IUsPerDecimil
Definition: plotter.h:622
virtual void FlashPadRoundRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, int aCornerRadius, const EDA_ANGLE &aOrient, OUTLINE_MODE aTraceMode, void *aData)=0
void markerVBar(const VECTOR2I &pos, int radius)
Plot a | bar centered on the position.
Definition: plotter.cpp:352
wxString m_title
Definition: plotter.h:644
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
virtual void ThickArc(const VECTOR2I &aCentre, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, OUTLINE_MODE aTraceMode, void *aData)
Definition: plotter.cpp:592
void markerSquare(const VECTOR2I &position, int radius)
Plot a square centered on the position.
Definition: plotter.cpp:270
virtual int GetCurrentLineWidth() const
Definition: plotter.h:153
bool m_colorMode
Definition: plotter.h:636
virtual void FlashPadRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
double GetDashMarkLenIU(int aLineWidth) const
Definition: plotter.cpp:137
virtual void SetColor(const COLOR4D &color)=0
wxString m_filename
Definition: plotter.h:643
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
Container for project specific data.
Definition: project.h:63
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:41
FILL_T
Definition: eda_shape.h:54
OUTLINE_MODE
Definition: outline_mode.h:25
DXF_UNITS
Definition: plotter.h:58
void PlotDrawingSheet(PLOTTER *plotter, const PROJECT *aProject, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, const std::map< wxString, wxString > *aProperties, const wxString &aSheetNumber, int aSheetCount, const wxString &aSheetName, const wxString &aSheetPath, const wxString &aFilename, COLOR4D aColor=COLOR4D::UNSPECIFIED, bool aIsFirstPage=true)
PLOT_TEXT_MODE
Which kind of text to output with the PSLIKE plotters.
Definition: plotter.h:96
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
PLOT_FORMAT
The set of supported output plot formats.
Definition: plotter.h:70
PLOT_DASH_TYPE
Dashed line types.
Definition: stroke_params.h:48
GR_TEXT_H_ALIGN_T
GR_TEXT_V_ALIGN_T
VECTOR2< int > VECTOR2I
Definition: vector2d.h:618