KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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-2023 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
25#ifndef PLOT_COMMON_H_
26#define PLOT_COMMON_H_
27
28#include <eda_shape.h>
29#include <vector>
30#include <math/box2.h>
31#include <gr_text.h>
32#include <page_info.h>
33#include <outline_mode.h>
34#include <gal/color4d.h>
35#include <stroke_params.h>
36#include <render_settings.h>
37
38
39class COLOR_SETTINGS;
40class SHAPE_ARC;
41class SHAPE_POLY_SET;
44class PROJECT;
45
47
48
49// Must be in the same order as the drop-down list in the plot dialog inside pcbnew
50// Units (inch/mm for DXF plotter
51enum class DXF_UNITS
52{
53 INCHES = 0,
54 MILLIMETERS = 1
55};
56
57
63enum class PLOT_FORMAT
64{
65 UNDEFINED = -1,
66 FIRST_FORMAT = 0,
68 GERBER,
69 POST,
70 DXF,
71 PDF,
72 SVG,
74};
75
90{
91 STROKE,
92 NATIVE,
93 PHANTOM,
95};
96
104{
105public:
106 // These values are used as flag for pen or aperture selection
107 static const int DO_NOT_SET_LINE_WIDTH = -2; // Skip selection
108 static const int USE_DEFAULT_LINE_WIDTH = -1; // use the default pen
109
110 PLOTTER();
111
112 virtual ~PLOTTER();
113
119 virtual PLOT_FORMAT GetPlotterType() const = 0;
120
121 virtual bool StartPlot( const wxString& aPageNumber ) = 0;
122 virtual bool EndPlot() = 0;
123
124 virtual void SetNegative( bool aNegative ) { m_negativeMode = aNegative; }
125
131 virtual void SetColorMode( bool aColorMode ) { m_colorMode = aColorMode; }
132 bool GetColorMode() const { return m_colorMode; }
133
134 void SetRenderSettings( RENDER_SETTINGS* aSettings ) { m_renderSettings = aSettings; }
136
137 virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_pageInfo = aPageSettings; }
139
146 virtual void SetCurrentLineWidth( int width, void* aData = nullptr ) = 0;
147 virtual int GetCurrentLineWidth() const { return m_currentPenWidth; }
148
149 virtual void SetColor( const COLOR4D& color ) = 0;
150
151 virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) = 0;
152
153 virtual void SetCreator( const wxString& aCreator ) { m_creator = aCreator; }
154 virtual void SetTitle( const wxString& aTitle ) { m_title = aTitle; }
155 virtual void SetAuthor( const wxString& aAuthor ) { m_author = aAuthor; }
156 virtual void SetSubject( const wxString& aSubject ) { m_subject = aSubject; }
157
163 void AddLineToHeader( const wxString& aExtraString )
164 {
165 m_headerExtraLines.Add( aExtraString );
166 }
167
172 {
173 m_headerExtraLines.Clear();
174 }
175
186 virtual void SetViewport( const VECTOR2I& aOffset, double aIusPerDecimil,
187 double aScale, bool aMirror ) = 0;
188
198 virtual bool OpenFile( const wxString& aFullFilename );
199
205 double GetIUsPerDecimil() const { return m_IUsPerDecimil; }
206
207 int GetPlotterArcLowDef() const { return m_IUsPerDecimil * 8; }
208 int GetPlotterArcHighDef() const { return m_IUsPerDecimil * 2; }
209
210 // Low level primitives
211 virtual void Rect( const VECTOR2I& p1, const VECTOR2I& p2, FILL_T fill,
212 int width = USE_DEFAULT_LINE_WIDTH ) = 0;
213 virtual void Circle( const VECTOR2I& pos, int diametre, FILL_T fill,
214 int width = USE_DEFAULT_LINE_WIDTH ) = 0;
215
216 virtual void Arc( const VECTOR2D& aStart, const VECTOR2D& aMid, const VECTOR2D& aEnd,
217 FILL_T aFill, int aWidth = USE_DEFAULT_LINE_WIDTH );
218
219 virtual void Arc( const VECTOR2D& aCenter, const EDA_ANGLE& aStartAngle,
220 const EDA_ANGLE& aAngle, double aRadius, FILL_T aFill,
221 int aWidth = USE_DEFAULT_LINE_WIDTH );
222
228 virtual void BezierCurve( const VECTOR2I& aStart, const VECTOR2I& aControl1,
229 const VECTOR2I& aControl2, const VECTOR2I& aEnd,
230 int aTolerance, int aLineThickness = USE_DEFAULT_LINE_WIDTH );
231
240 virtual void PenTo( const VECTOR2I& pos, char plume ) = 0;
241
242 // Convenience functions for PenTo
243 void MoveTo( const VECTOR2I& pos )
244 {
245 PenTo( pos, 'U' );
246 }
247
248 void LineTo( const VECTOR2I& pos )
249 {
250 PenTo( pos, 'D' );
251 }
252
253 void FinishTo( const VECTOR2I& pos )
254 {
255 PenTo( pos, 'D' );
256 PenTo( pos, 'Z' );
257 }
258
260 {
261 // The point is not important with Z motion
262 PenTo( VECTOR2I( 0, 0 ), 'Z' );
263 }
264
273 virtual void PlotPoly( const std::vector<VECTOR2I>& aCornerList, FILL_T aFill,
274 int aWidth = USE_DEFAULT_LINE_WIDTH, void* aData = nullptr ) = 0;
275
284 virtual void PlotPoly( const SHAPE_LINE_CHAIN& aCornerList, FILL_T aFill,
285 int aWidth = USE_DEFAULT_LINE_WIDTH, void* aData = nullptr );
286
297 virtual void PlotImage( const wxImage& aImage, const VECTOR2I& aPos, double aScaleFactor );
298
299 // Higher level primitives -- can be drawn as line, sketch or 'filled'
300 virtual void ThickSegment( const VECTOR2I& start, const VECTOR2I& end, int width,
301 OUTLINE_MODE tracemode, void* aData );
302
303 virtual void ThickArc( const EDA_SHAPE& aArcShape,
304 OUTLINE_MODE aTraceMode, void* aData );
305
306 virtual void ThickArc( const VECTOR2D& aCentre, const EDA_ANGLE& aStAngle,
307 const EDA_ANGLE& aAngle, double aRadius, int aWidth,
308 OUTLINE_MODE aTraceMode, void* aData );
309
310 virtual void ThickRect( const VECTOR2I& p1, const VECTOR2I& p2, int width, OUTLINE_MODE tracemode,
311 void* aData );
312
313 virtual void ThickCircle( const VECTOR2I& pos, int diametre, int width, OUTLINE_MODE tracemode,
314 void* aData );
315
316 virtual void FilledCircle( const VECTOR2I& pos, int diametre, OUTLINE_MODE tracemode,
317 void* aData );
318
319
320 // Flash primitives
321
328 virtual void FlashPadCircle( const VECTOR2I& aPadPos, int aDiameter, OUTLINE_MODE aTraceMode,
329 void* aData ) = 0;
330
338 virtual void FlashPadOval( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
339 const EDA_ANGLE& aPadOrient, OUTLINE_MODE aTraceMode,
340 void* aData ) = 0;
341
349 virtual void FlashPadRect( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
350 const EDA_ANGLE& aPadOrient, OUTLINE_MODE aTraceMode,
351 void* aData ) = 0;
352
361 virtual void FlashPadRoundRect( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
362 int aCornerRadius, const EDA_ANGLE& aOrient,
363 OUTLINE_MODE aTraceMode, void* aData ) = 0;
364
373 virtual void FlashPadCustom( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
374 const EDA_ANGLE& aPadOrient, SHAPE_POLY_SET* aPolygons,
375 OUTLINE_MODE aTraceMode, void* aData ) = 0;
376
387 virtual void FlashPadTrapez( const VECTOR2I& aPadPos, const VECTOR2I* aCorners,
388 const EDA_ANGLE& aPadOrient, OUTLINE_MODE aTraceMode,
389 void* aData ) = 0;
390
401 virtual void FlashRegularPolygon( const VECTOR2I& aShapePos, int aDiameter, int aCornerCount,
402 const EDA_ANGLE& aOrient, OUTLINE_MODE aTraceMode,
403 void* aData ) = 0;
404
425 virtual void Text( const VECTOR2I& aPos,
426 const COLOR4D& aColor,
427 const wxString& aText,
428 const EDA_ANGLE& aOrient,
429 const VECTOR2I& aSize,
430 enum GR_TEXT_H_ALIGN_T aH_justify,
431 enum GR_TEXT_V_ALIGN_T aV_justify,
432 int aPenWidth,
433 bool aItalic,
434 bool aBold,
435 bool aMultilineAllowed,
436 KIFONT::FONT* aFont,
437 const KIFONT::METRICS& aFontMetrics,
438 void* aData = nullptr );
439
440 virtual void PlotText( const VECTOR2I& aPos,
441 const COLOR4D& aColor,
442 const wxString& aText,
443 const TEXT_ATTRIBUTES& aAttributes,
444 KIFONT::FONT* aFont,
445 const KIFONT::METRICS& aFontMetrics,
446 void* aData = nullptr );
453 virtual void HyperlinkBox( const BOX2I& aBox, const wxString& aDestinationURL )
454 {
455 // NOP for most plotters.
456 }
457
464 virtual void HyperlinkMenu( const BOX2I& aBox, const std::vector<wxString>& aDestURLs )
465 {
466 // NOP for most plotters.
467 }
468
475 virtual void Bookmark( const BOX2I& aBox, const wxString& aName,
476 const wxString& aGroupName = wxEmptyString )
477 {
478 // NOP for most plotters.
479 }
480
484 static const unsigned MARKER_COUNT = 58;
485
493 void Marker( const VECTOR2I& position, int diametre, unsigned aShapeId );
494
504 virtual void SetLayerPolarity( bool aPositive )
505 {
506 // NOP for most plotters
507 }
508
513 virtual void SetTextMode( PLOT_TEXT_MODE mode )
514 {
515 // NOP for most plotters.
516 }
517
518 virtual void SetGerberCoordinatesFormat( int aResolution, bool aUseInches = false )
519 {
520 // NOP for most plotters. Only for Gerber plotter
521 }
522
524 virtual void SetSvgCoordinatesFormat( unsigned aPrecision )
525 {
526 // NOP for most plotters. Only for SVG plotter
527 }
528
536 virtual void StartBlock( void* aData ) {}
537
545 virtual void EndBlock( void* aData ) {}
546
552
553
554protected:
565 virtual void polyArc( const VECTOR2D& aCentre, const EDA_ANGLE& aStartAngle,
566 const EDA_ANGLE& aAngle, double aRadius, FILL_T aFill,
567 int aWidth = USE_DEFAULT_LINE_WIDTH );
568
569 // These are marker subcomponents
573 void markerCircle( const VECTOR2I& pos, int radius );
574
578 void markerHBar( const VECTOR2I& pos, int radius );
579
583 void markerSlash( const VECTOR2I& pos, int radius );
584
588 void markerBackSlash( const VECTOR2I& pos, int radius );
589
593 void markerVBar( const VECTOR2I& pos, int radius );
594
598 void markerSquare( const VECTOR2I& position, int radius );
599
603 void markerLozenge( const VECTOR2I& position, int radius );
604
605 // Helper function for sketched filler segment
606
610 void segmentAsOval( const VECTOR2I& start, const VECTOR2I& end, int width,
611 OUTLINE_MODE tracemode );
612
613 void sketchOval( const VECTOR2I& aPos, const VECTOR2I& aSize, const EDA_ANGLE& aOrient,
614 int aWidth );
615
616 // Coordinate and scaling conversion functions
617
623 virtual VECTOR2D userToDeviceCoordinates( const VECTOR2I& aCoordinate );
624
628 virtual VECTOR2D userToDeviceSize( const VECTOR2I& size );
629
633 virtual double userToDeviceSize( double size ) const;
634
635 double GetDotMarkLenIU( int aLineWidth ) const;
636
637 double GetDashMarkLenIU( int aLineWidth ) const;
638
639 double GetDashGapLenIU( int aLineWidth ) const;
640
641
642protected: // variables used in most of plotters:
645
646 /* Caller scale (how many IUs in a decimil - always); it's a double
647 * because in Eeschema there are 0.1 IUs in a decimil (Eeschema
648 * always works in mils internally) while PcbNew can work in decimil
649 * or nanometers, so this value would be >= 1 */
651
652 double m_iuPerDeviceUnit; // Device scale (from IUs to plotter device units;
653 // usually decimils)
654 VECTOR2I m_plotOffset; // Plot offset (in IUs)
655 bool m_plotMirror; // X axis orientation (SVG)
656 // and plot mirrored (only for PS, PDF HPGL and SVG)
657 bool m_mirrorIsHorizontal; // true to mirror horizontally (else vertically)
658 bool m_yaxisReversed; // true if the Y axis is top to bottom (SVG)
659
662
663 // Pen handling
664 bool m_colorMode; // true to plot in color, otherwise black & white
665 bool m_negativeMode; // true to generate a negative image (PS mode mainly)
667 char m_penState; // current pen state: 'U', 'D' or 'Z' (see PenTo)
668 VECTOR2I m_penLastpos; // last pen position; -1,-1 when pen is at rest
669
670 wxString m_creator;
671 wxString m_filename;
672 wxString m_title;
673 wxString m_author;
674 wxString m_subject;
676 VECTOR2I m_paperSize; // Paper size in IU - not in mils
677
678 wxArrayString m_headerExtraLines; // a set of string to print in header file
679
681};
682
683
684class TITLE_BLOCK;
685
686void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
687 const PAGE_INFO& aPageInfo, const std::map<wxString, wxString>*aProperties,
688 const wxString& aSheetNumber, int aSheetCount, const wxString& aSheetName,
689 const wxString& aSheetPath, const wxString& aFilename,
690 COLOR4D aColor = COLOR4D::UNSPECIFIED, bool aIsFirstPage = true );
691
694wxString GetDefaultPlotExtension( PLOT_FORMAT aFormat );
695
696
697#endif // PLOT_COMMON_H_
int color
Definition: DXF_plotter.cpp:58
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:131
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition: color4d.h:382
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:59
Base plotter engine class.
Definition: plotter.h:104
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:554
virtual void PlotImage(const wxImage &aImage, const VECTOR2I &aPos, double aScaleFactor)
Only PostScript plotters can plot bitmaps.
Definition: plotter.cpp:259
virtual void ThickRect(const VECTOR2I &p1, const VECTOR2I &p2, int width, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:622
wxArrayString m_headerExtraLines
Definition: plotter.h:678
virtual void ThickCircle(const VECTOR2I &pos, int diametre, int width, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:646
static const unsigned MARKER_COUNT
Draw a marker (used for the drill map).
Definition: plotter.h:484
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
wxString m_subject
Definition: plotter.h:674
virtual void SetAuthor(const wxString &aAuthor)
Definition: plotter.h:155
bool m_mirrorIsHorizontal
Definition: plotter.h:657
virtual void SetNegative(bool aNegative)
Definition: plotter.h:124
virtual void SetSvgCoordinatesFormat(unsigned aPrecision)
Set the number of digits for mantissa in coordinates in mm for SVG plotter.
Definition: plotter.h:524
PLOTTER()
Definition: plotter.cpp:47
virtual void Arc(const VECTOR2D &aStart, const VECTOR2D &aMid, const VECTOR2D &aEnd, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH)
Definition: plotter.cpp:149
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:137
void SetRenderSettings(RENDER_SETTINGS *aSettings)
Definition: plotter.h:134
PAGE_INFO m_pageInfo
Definition: plotter.h:675
bool m_plotMirror
Definition: plotter.h:655
virtual void FilledCircle(const VECTOR2I &pos, int diametre, OUTLINE_MODE tracemode, void *aData)
Definition: plotter.cpp:662
static const int USE_DEFAULT_LINE_WIDTH
Definition: plotter.h:108
virtual void SetTitle(const wxString &aTitle)
Definition: plotter.h:154
virtual bool EndPlot()=0
virtual void polyArc(const VECTOR2D &aCentre, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle, double aRadius, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH)
Generic fallback: arc rendered as a polyline.
Definition: plotter.cpp:180
void MoveTo(const VECTOR2I &pos)
Definition: plotter.h:243
virtual void SetDash(int aLineWidth, LINE_STYLE aLineStyle)=0
void markerSlash(const VECTOR2I &pos, int radius)
Plot a / bar centered on the position.
Definition: plotter.cpp:343
void FinishTo(const VECTOR2I &pos)
Definition: plotter.h:253
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:229
wxString m_author
Definition: plotter.h:673
bool m_yaxisReversed
Definition: plotter.h:658
virtual bool StartPlot(const wxString &aPageNumber)=0
double m_iuPerDeviceUnit
Definition: plotter.h:652
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:135
VECTOR2I m_plotOffset
Definition: plotter.h:654
VECTOR2I m_penLastpos
Definition: plotter.h:668
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:205
virtual void SetGerberCoordinatesFormat(int aResolution, bool aUseInches=false)
Definition: plotter.h:518
VECTOR2I m_paperSize
Definition: plotter.h:676
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:501
virtual void Bookmark(const BOX2I &aBox, const wxString &aName, const wxString &aGroupName=wxEmptyString)
Create a bookmark to a symbol.
Definition: plotter.h:475
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:513
int GetPlotterArcHighDef() const
Definition: plotter.h:208
char m_penState
Definition: plotter.h:667
void Marker(const VECTOR2I &position, int diametre, unsigned aShapeId)
Draw a pattern shape number aShapeId, to coord position.
Definition: plotter.cpp:364
wxString m_creator
Definition: plotter.h:670
virtual void SetCreator(const wxString &aCreator)
Definition: plotter.h:153
void markerHBar(const VECTOR2I &pos, int radius)
Plot a - bar centered on the position.
Definition: plotter.cpp:336
int m_currentPenWidth
Definition: plotter.h:666
virtual void HyperlinkBox(const BOX2I &aBox, const wxString &aDestinationURL)
Create a clickable hyperlink with a rectangular click area.
Definition: plotter.h:453
double m_plotScale
Plot scale - chosen by the user (even implicitly with 'fit in a4')
Definition: plotter.h:644
VECTOR2I GetPlotOffsetUserUnits()
Definition: plotter.h:551
void ClearHeaderLinesList()
Remove all lines from the list of free lines to print at the beginning of the file.
Definition: plotter.h:171
void markerCircle(const VECTOR2I &pos, int radius)
Plot a circle centered on the position.
Definition: plotter.cpp:303
virtual void FlashPadCircle(const VECTOR2I &aPadPos, int aDiameter, OUTLINE_MODE aTraceMode, void *aData)=0
bool GetColorMode() const
Definition: plotter.h:132
virtual void ThickArc(const EDA_SHAPE &aArcShape, OUTLINE_MODE aTraceMode, void *aData)
Definition: plotter.cpp:597
PAGE_INFO & PageSettings()
Definition: plotter.h:138
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:163
FILE * m_outputFile
Output file.
Definition: plotter.h:661
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition: plotter.h:131
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:248
virtual void StartBlock(void *aData)
calling this function allows one to define the beginning of a group of drawing items,...
Definition: plotter.h:536
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:259
static const int DO_NOT_SET_LINE_WIDTH
Definition: plotter.h:107
void markerLozenge(const VECTOR2I &position, int radius)
Plot a lozenge centered on the position.
Definition: plotter.cpp:309
RENDER_SETTINGS * m_renderSettings
Definition: plotter.h:680
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, const KIFONT::METRICS &aFontMetrics, void *aData=nullptr)
Draw text with the plotter.
Definition: plotter.cpp:691
void markerBackSlash(const VECTOR2I &pos, int radius)
Plot a \ bar centered on the position.
Definition: plotter.cpp:350
virtual void FlashPadOval(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
virtual void SetSubject(const wxString &aSubject)
Definition: plotter.h:156
int GetPlotterArcLowDef() const
Definition: plotter.h:207
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:486
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:665
virtual void HyperlinkMenu(const BOX2I &aBox, const std::vector< wxString > &aDestURLs)
Create a clickable hyperlink menu with a rectangular click area.
Definition: plotter.h:464
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:504
double m_IUsPerDecimil
Definition: plotter.h:650
virtual void PlotText(const VECTOR2I &aPos, const COLOR4D &aColor, const wxString &aText, const TEXT_ATTRIBUTES &aAttributes, KIFONT::FONT *aFont, const KIFONT::METRICS &aFontMetrics, void *aData=nullptr)
Definition: plotter.cpp:753
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:357
wxString m_title
Definition: plotter.h:672
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
void markerSquare(const VECTOR2I &position, int radius)
Plot a square centered on the position.
Definition: plotter.cpp:275
virtual int GetCurrentLineWidth() const
Definition: plotter.h:147
bool m_colorMode
Definition: plotter.h:664
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:671
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:545
Container for project specific data.
Definition: project.h:62
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:52
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:90
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:64
LINE_STYLE
Dashed line types.
Definition: stroke_params.h:48
GR_TEXT_H_ALIGN_T
GR_TEXT_V_ALIGN_T
VECTOR2< int > VECTOR2I
Definition: vector2d.h:588