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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef PLOT_COMMON_H_
22#define PLOT_COMMON_H_
23
24#include <eda_shape.h>
25#include <vector>
26#include <math/box2.h>
27#include <gr_text.h>
28#include <page_info.h>
29#include <gal/color4d.h>
30#include <stroke_params.h>
31#include <render_settings.h>
32#include <font/font.h>
33
34
35class COLOR_SETTINGS;
36class SHAPE_ARC;
37class SHAPE_POLY_SET;
40class PROJECT;
41
43
44
45// Must be in the same order as the drop-down list in the plot dialog inside pcbnew
46// Units (inch/mm for DXF plotter
47enum class DXF_UNITS
48{
49 INCH = 0, // Do not use MM: it conficts with a Windows header
50 MM = 1
51};
52
53
72
77{
78 SKETCH = 0, // sketch mode: draw segments outlines only
79 FILLED = 1 // normal mode: solid segments
80};
81
102
104{
105public:
106 virtual DXF_OUTLINE_MODE GetDXFPlotMode() const { wxFAIL; return DXF_OUTLINE_MODE::FILLED; }
108};
109
110
125
133{
134public:
135 // These values are used as flag for pen or aperture selection
136 static const int DO_NOT_SET_LINE_WIDTH = -2; // Skip selection
137 static const int USE_DEFAULT_LINE_WIDTH = -1; // use the default pen
138
139 PLOTTER( const PROJECT* aProject = nullptr );
140
141 virtual ~PLOTTER();
142
148 virtual PLOT_FORMAT GetPlotterType() const = 0;
149
150 virtual bool StartPlot( const wxString& aPageNumber ) = 0;
151 virtual bool EndPlot() = 0;
152
153 virtual void SetNegative( bool aNegative ) { m_negativeMode = aNegative; }
154
160 virtual void SetColorMode( bool aColorMode ) { m_colorMode = aColorMode; }
161 bool GetColorMode() const { return m_colorMode; }
162
163 void SetRenderSettings( RENDER_SETTINGS* aSettings ) { m_renderSettings = aSettings; }
165
166 virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_pageInfo = aPageSettings; }
168
169 void SetPlotMirrored( bool aMirror ) { m_plotMirror = aMirror; };
170 bool GetPlotMirrored() const { return m_plotMirror; }
171
178 virtual void SetCurrentLineWidth( int width, void* aData = nullptr ) = 0;
179 virtual int GetCurrentLineWidth() const { return m_currentPenWidth; }
180
181 virtual void SetColor( const COLOR4D& color ) = 0;
182
183 virtual void SetDash( int aLineWidth, LINE_STYLE aLineStyle ) = 0;
184
185 virtual void SetCreator( const wxString& aCreator ) { m_creator = aCreator; }
186 virtual void SetTitle( const wxString& aTitle ) { m_title = aTitle; }
187 virtual void SetAuthor( const wxString& aAuthor ) { m_author = aAuthor; }
188 virtual void SetSubject( const wxString& aSubject ) { m_subject = aSubject; }
189
195 void AddLineToHeader( const wxString& aExtraString )
196 {
197 m_headerExtraLines.Add( aExtraString );
198 }
199
204 {
205 m_headerExtraLines.Clear();
206 }
207
218 virtual void SetViewport( const VECTOR2I& aOffset, double aIusPerDecimil,
219 double aScale, bool aMirror ) = 0;
220
231 void SetLayersToExport( const std::vector<std::pair<PCB_LAYER_ID, wxString>>& aLayersToExport ) { m_layersToExport = aLayersToExport; }
232
240 PCB_LAYER_ID GetLayer() const { return m_layer; }
241
249 void SetLayer( PCB_LAYER_ID aLayer ) { m_layer = aLayer; }
250
261 virtual bool OpenFile( const wxString& aFullFilename );
262
268 double GetIUsPerDecimil() const { return m_IUsPerDecimil; }
269
270 int GetPlotterArcLowDef() const { return m_IUsPerDecimil * 8; }
271 int GetPlotterArcHighDef() const { return m_IUsPerDecimil * 2; }
272
273 // Low level primitives
274 virtual void Rect( const VECTOR2I& p1, const VECTOR2I& p2, FILL_T fill, int width,
275 int aCornerRadius = 0 ) = 0;
276 virtual void Circle( const VECTOR2I& pos, int diametre, FILL_T fill, int width ) = 0;
277
278 virtual void Arc( const VECTOR2D& aStart, const VECTOR2D& aMid, const VECTOR2D& aEnd,
279 FILL_T aFill, int aWidth );
280
281 virtual void Arc( const VECTOR2D& aCenter, const EDA_ANGLE& aStartAngle,
282 const EDA_ANGLE& aAngle, double aRadius, FILL_T aFill,
283 int aWidth );
284
290 virtual void BezierCurve( const VECTOR2I& aStart, const VECTOR2I& aControl1,
291 const VECTOR2I& aControl2, const VECTOR2I& aEnd,
292 int aTolerance, int aLineThickness );
293
302 virtual void PenTo( const VECTOR2I& pos, char plume ) = 0;
303
304 // Convenience functions for PenTo
305 void MoveTo( const VECTOR2I& pos )
306 {
307 PenTo( pos, 'U' );
308 }
309
310 void LineTo( const VECTOR2I& pos )
311 {
312 PenTo( pos, 'D' );
313 }
314
315 void FinishTo( const VECTOR2I& pos )
316 {
317 PenTo( pos, 'D' );
318 PenTo( pos, 'Z' );
319 }
320
322 {
323 // The point is not important with Z motion
324 PenTo( VECTOR2I( 0, 0 ), 'Z' );
325 }
326
335 virtual void PlotPoly( const std::vector<VECTOR2I>& aCornerList, FILL_T aFill, int aWidth,
336 void* aData ) = 0;
337
347 virtual void PlotPoly( const SHAPE_LINE_CHAIN& aLineChain, FILL_T aFill, int aWidth, void* aData );
348
359 virtual void PlotImage( const wxImage& aImage, const VECTOR2I& aPos, double aScaleFactor );
360
361 // Higher level primitives -- can be drawn as line, sketch or 'filled'
362 virtual void ThickSegment( const VECTOR2I& start, const VECTOR2I& end, int width, void* aData );
363
364 virtual void ThickArc( const EDA_SHAPE& aArcShape, void* aData, int aWidth );
365
366 virtual void ThickArc( const VECTOR2D& aCentre, const EDA_ANGLE& aStAngle,
367 const EDA_ANGLE& aAngle, double aRadius, int aWidth, void* aData );
368
369 virtual void ThickRect( const VECTOR2I& p1, const VECTOR2I& p2, int width, void* aData );
370
371 virtual void ThickCircle( const VECTOR2I& pos, int diametre, int width, void* aData );
372
373 virtual void FilledCircle( const VECTOR2I& pos, int diametre, void* aData );
374
375 virtual void ThickOval( const VECTOR2I& aPos, const VECTOR2I& aSize, const EDA_ANGLE& aOrient,
376 int aWidth, void* aData );
377
378 virtual void ThickPoly( const SHAPE_POLY_SET& aPoly, int aWidth, void* aData );
379
380 // Flash primitives
381
387 virtual void FlashPadCircle( const VECTOR2I& aPadPos, int aDiameter, void* aData ) = 0;
388
395 virtual void FlashPadOval( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
396 const EDA_ANGLE& aPadOrient, void* aData ) = 0;
397
404 virtual void FlashPadRect( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
405 const EDA_ANGLE& aPadOrient, void* aData ) = 0;
406
414 virtual void FlashPadRoundRect( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
415 int aCornerRadius, const EDA_ANGLE& aOrient,
416 void* aData ) = 0;
417
425 virtual void FlashPadCustom( const VECTOR2I& aPadPos, const VECTOR2I& aSize,
426 const EDA_ANGLE& aPadOrient, SHAPE_POLY_SET* aPolygons,
427 void* aData ) = 0;
428
438 virtual void FlashPadTrapez( const VECTOR2I& aPadPos, const VECTOR2I* aCorners,
439 const EDA_ANGLE& aPadOrient, void* aData ) = 0;
440
451 virtual void FlashRegularPolygon( const VECTOR2I& aShapePos, int aDiameter, int aCornerCount,
452 const EDA_ANGLE& aOrient, void* aData ) = 0;
453
475 virtual void Text( const VECTOR2I& aPos,
476 const COLOR4D& aColor,
477 const wxString& aText,
478 const EDA_ANGLE& aOrient,
479 const VECTOR2I& aSize,
480 enum GR_TEXT_H_ALIGN_T aH_justify,
481 enum GR_TEXT_V_ALIGN_T aV_justify,
482 int aPenWidth,
483 bool aItalic,
484 bool aBold,
485 bool aMultilineAllowed,
486 KIFONT::FONT* aFont,
487 const KIFONT::METRICS& aFontMetrics,
488 void* aData = nullptr );
489
490 virtual void PlotText( const VECTOR2I& aPos,
491 const COLOR4D& aColor,
492 const wxString& aText,
493 const TEXT_ATTRIBUTES& aAttributes,
494 KIFONT::FONT* aFont = nullptr,
495 const KIFONT::METRICS& aFontMetrics = KIFONT::METRICS::Default(),
496 void* aData = nullptr );
503 virtual void HyperlinkBox( const BOX2I& aBox, const wxString& aDestinationURL )
504 {
505 // NOP for most plotters.
506 }
507
514 virtual void HyperlinkMenu( const BOX2I& aBox, const std::vector<wxString>& aDestURLs )
515 {
516 // NOP for most plotters.
517 }
518
525 virtual void Bookmark( const BOX2I& aBox, const wxString& aName,
526 const wxString& aGroupName = wxEmptyString )
527 {
528 // NOP for most plotters.
529 }
530
534 static const unsigned MARKER_COUNT = 58;
535
543 void Marker( const VECTOR2I& position, int diametre, unsigned aShapeId );
544
554 virtual void SetLayerPolarity( bool aPositive )
555 {
556 // NOP for most plotters
557 }
558
564 virtual void SetTextMode( PLOT_TEXT_MODE mode )
565 {
566 // NOP for most plotters.
567 }
568
569 virtual void SetGerberCoordinatesFormat( int aResolution, bool aUseInches = false )
570 {
571 // NOP for most plotters. Only for Gerber plotter
572 }
573
575 virtual void SetSvgCoordinatesFormat( unsigned aPrecision )
576 {
577 // NOP for most plotters. Only for SVG plotter
578 }
579
587 virtual void StartBlock( void* aData ) {}
588
596 virtual void EndBlock( void* aData ) {}
597
602
603
604protected:
615 virtual void polyArc( const VECTOR2D& aCentre, const EDA_ANGLE& aStartAngle,
616 const EDA_ANGLE& aAngle, double aRadius, FILL_T aFill, int aWidth );
617
618 // These are marker subcomponents
622 void markerCircle( const VECTOR2I& pos, int radius );
623
627 void markerHBar( const VECTOR2I& pos, int radius );
628
632 void markerSlash( const VECTOR2I& pos, int radius );
633
637 void markerBackSlash( const VECTOR2I& pos, int radius );
638
642 void markerVBar( const VECTOR2I& pos, int radius );
643
647 void markerSquare( const VECTOR2I& position, int radius );
648
652 void markerLozenge( const VECTOR2I& position, int radius );
653
654 // Helper function for sketched filler segment
655
656
657 // Coordinate and scaling conversion functions
658
664 virtual VECTOR2D userToDeviceCoordinates( const VECTOR2I& aCoordinate );
665
669 virtual VECTOR2D userToDeviceSize( const VECTOR2I& size );
670
674 virtual double userToDeviceSize( double size ) const;
675
676 double GetDotMarkLenIU( int aLineWidth ) const;
677
678 double GetDashMarkLenIU( int aLineWidth ) const;
679
680 double GetDashGapLenIU( int aLineWidth ) const;
681
682
683protected: // variables used in most of plotters:
684
687
688 /* Caller scale (how many IUs in a decimil - always); it's a double
689 * because in Eeschema there are 0.1 IUs in a decimil (Eeschema
690 * always works in mils internally) while PcbNew can work in decimil
691 * or nanometers, so this value would be >= 1 */
693
694 double m_iuPerDeviceUnit; // Device scale (from IUs to plotter device units;
695 // usually decimils)
696 VECTOR2I m_plotOffset; // Plot offset (in IUs)
697 bool m_plotMirror; // X axis orientation (SVG)
698 // and plot mirrored (only for PS, PDF and SVG)
699 bool m_mirrorIsHorizontal; // true to mirror horizontally (else vertically)
700 bool m_yaxisReversed; // true if the Y axis is top to bottom (SVG)
701
704
705 // Pen handling
706 bool m_colorMode; // true to plot in color, otherwise black & white
707 bool m_negativeMode; // true to generate a negative image (PS mode mainly)
709 char m_penState; // current pen state: 'U', 'D' or 'Z' (see PenTo)
710 VECTOR2I m_penLastpos; // last pen position; -1,-1 when pen is at rest
711
712 wxString m_creator;
713 wxString m_filename;
714 wxString m_title;
715 wxString m_author;
716 wxString m_subject;
718 VECTOR2I m_paperSize; // Paper size in IU - not in mils
719
720 wxArrayString m_headerExtraLines; // a set of string to print in header file
721
723
725 std::vector<std::pair<PCB_LAYER_ID, wxString>> m_layersToExport;
726
728};
729
730
731class TITLE_BLOCK;
732
733void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
734 const PAGE_INFO& aPageInfo, const std::map<wxString, wxString>* aProperties,
735 const wxString& aSheetNumber, int aSheetCount, const wxString& aSheetName,
736 const wxString& aSheetPath, const wxString& aFilename, COLOR4D aColor = COLOR4D::UNSPECIFIED,
737 bool aIsFirstPage = true, const wxString& aVariantName = wxEmptyString,
738 const wxString& aVariantDesc = wxEmptyString );
739
743wxString GetDefaultPlotExtension( PLOT_FORMAT aFormat );
744
745
746#endif // PLOT_COMMON_H_
BOX2< VECTOR2I > BOX2I
Definition box2.h:918
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition color4d.h:398
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:94
static const METRICS & Default()
Definition font.cpp:48
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
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:75
Base plotter engine class.
Definition plotter.h:133
double GetDotMarkLenIU(int aLineWidth) const
Definition plotter.cpp:130
PCB_LAYER_ID GetLayer() const
Gets the ID of the current layer.
Definition plotter.h:240
virtual void PlotImage(const wxImage &aImage, const VECTOR2I &aPos, double aScaleFactor)
Only PostScript plotters can plot bitmaps.
Definition plotter.cpp:256
virtual void FlashPadRoundRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, int aCornerRadius, const EDA_ANGLE &aOrient, void *aData)=0
wxArrayString m_headerExtraLines
Definition plotter.h:720
static const unsigned MARKER_COUNT
Draw a marker (used for the drill map).
Definition plotter.h:534
double GetDashGapLenIU(int aLineWidth) const
Definition plotter.cpp:142
const PROJECT * m_project
Definition plotter.h:724
virtual void Circle(const VECTOR2I &pos, int diametre, FILL_T fill, int width)=0
std::vector< std::pair< PCB_LAYER_ID, wxString > > m_layersToExport
Definition plotter.h:725
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
Definition plotter.cpp:73
wxString m_subject
Definition plotter.h:716
virtual void SetAuthor(const wxString &aAuthor)
Definition plotter.h:187
bool m_mirrorIsHorizontal
Definition plotter.h:699
virtual void SetNegative(bool aNegative)
Definition plotter.h:153
virtual void SetSvgCoordinatesFormat(unsigned aPrecision)
Set the number of digits for mantissa in coordinates in mm for SVG plotter.
Definition plotter.h:575
virtual void ThickPoly(const SHAPE_POLY_SET &aPoly, int aWidth, void *aData)
Definition plotter.cpp:621
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition plotter.h:166
void SetLayer(PCB_LAYER_ID aLayer)
Sets the ID of the current layer.
Definition plotter.h:249
void SetRenderSettings(RENDER_SETTINGS *aSettings)
Definition plotter.h:163
PAGE_INFO m_pageInfo
Definition plotter.h:717
bool m_plotMirror
Definition plotter.h:697
static const int USE_DEFAULT_LINE_WIDTH
Definition plotter.h:137
virtual void SetTitle(const wxString &aTitle)
Definition plotter.h:186
virtual void FilledCircle(const VECTOR2I &pos, int diametre, void *aData)
Definition plotter.cpp:615
virtual bool EndPlot()=0
virtual void FlashPadOval(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, void *aData)=0
void MoveTo(const VECTOR2I &pos)
Definition plotter.h:305
virtual void FlashPadRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, void *aData)=0
virtual void ThickOval(const VECTOR2I &aPos, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, int aWidth, void *aData)
Definition plotter.cpp:483
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:340
void FinishTo(const VECTOR2I &pos)
Definition plotter.h:315
wxString m_author
Definition plotter.h:715
bool m_yaxisReversed
Definition plotter.h:700
virtual bool StartPlot(const wxString &aPageNumber)=0
virtual void polyArc(const VECTOR2D &aCentre, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle, double aRadius, FILL_T aFill, int aWidth)
Generic fallback: arc rendered as a polyline.
Definition plotter.cpp:179
void SetLayersToExport(const std::vector< std::pair< PCB_LAYER_ID, wxString > > &aLayersToExport)
Sets the list of layers to export to the specified vector.
Definition plotter.h:231
double m_iuPerDeviceUnit
Definition plotter.h:694
PCB_LAYER_ID m_layer
Definition plotter.h:727
RENDER_SETTINGS * RenderSettings()
Definition plotter.h:164
VECTOR2I m_plotOffset
Definition plotter.h:696
VECTOR2I m_penLastpos
Definition plotter.h:710
virtual VECTOR2D userToDeviceCoordinates(const VECTOR2I &aCoordinate)
Modify coordinates according to the orientation, scale factor, and offsets trace.
Definition plotter.cpp:89
virtual ~PLOTTER()
Definition plotter.cpp:65
double GetIUsPerDecimil() const
The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establ...
Definition plotter.h:268
virtual void SetGerberCoordinatesFormat(int aResolution, bool aUseInches=false)
Definition plotter.h:569
bool GetPlotMirrored() const
Definition plotter.h:170
VECTOR2I m_paperSize
Definition plotter.h:718
virtual void FlashRegularPolygon(const VECTOR2I &aShapePos, int aDiameter, int aCornerCount, const EDA_ANGLE &aOrient, void *aData)=0
Flash a regular polygon.
virtual VECTOR2D userToDeviceSize(const VECTOR2I &size)
Modify size according to the plotter scale factors (VECTOR2I version, returns a VECTOR2D).
Definition plotter.cpp:114
virtual void Bookmark(const BOX2I &aBox, const wxString &aName, const wxString &aGroupName=wxEmptyString)
Create a bookmark to a symbol.
Definition plotter.h:525
virtual PLOT_FORMAT GetPlotterType() const =0
Return the effective plot engine in use.
virtual void ThickArc(const EDA_SHAPE &aArcShape, void *aData, int aWidth)
Definition plotter.cpp:578
virtual void SetTextMode(PLOT_TEXT_MODE mode)
Change the current text mode.
Definition plotter.h:564
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width, int aCornerRadius=0)=0
int GetPlotterArcHighDef() const
Definition plotter.h:271
char m_penState
Definition plotter.h:709
void Marker(const VECTOR2I &position, int diametre, unsigned aShapeId)
Draw a pattern shape number aShapeId, to coord position.
Definition plotter.cpp:361
virtual void BezierCurve(const VECTOR2I &aStart, const VECTOR2I &aControl1, const VECTOR2I &aControl2, const VECTOR2I &aEnd, int aTolerance, int aLineThickness)
Generic fallback: Cubic Bezier curve rendered as a polyline.
Definition plotter.cpp:228
wxString m_creator
Definition plotter.h:712
virtual void SetCreator(const wxString &aCreator)
Definition plotter.h:185
void markerHBar(const VECTOR2I &pos, int radius)
Plot a - bar centered on the position.
Definition plotter.cpp:333
int m_currentPenWidth
Definition plotter.h:708
virtual void HyperlinkBox(const BOX2I &aBox, const wxString &aDestinationURL)
Create a clickable hyperlink with a rectangular click area.
Definition plotter.h:503
double m_plotScale
Plot scale - chosen by the user (even implicitly with 'fit in a4')
Definition plotter.h:686
VECTOR2I GetPlotOffsetUserUnits()
Definition plotter.h:601
void ClearHeaderLinesList()
Remove all lines from the list of free lines to print at the beginning of the file.
Definition plotter.h:203
void markerCircle(const VECTOR2I &pos, int radius)
Plot a circle centered on the position.
Definition plotter.cpp:300
virtual void FlashPadTrapez(const VECTOR2I &aPadPos, const VECTOR2I *aCorners, const EDA_ANGLE &aPadOrient, void *aData)=0
Flash a trapezoidal pad.
bool GetColorMode() const
Definition plotter.h:161
PLOTTER(const PROJECT *aProject=nullptr)
Definition plotter.cpp:44
PAGE_INFO & PageSettings()
Definition plotter.h:167
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:195
FILE * m_outputFile
Output file.
Definition plotter.h:703
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
Definition plotter.h:160
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:310
virtual void StartBlock(void *aData)
calling this function allows one to define the beginning of a group of drawing items,...
Definition plotter.h:587
virtual void PenTo(const VECTOR2I &pos, char plume)=0
Moveto/lineto primitive, moves the 'pen' to the specified direction.
virtual void FlashPadCustom(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, SHAPE_POLY_SET *aPolygons, void *aData)=0
void PenFinish()
Definition plotter.h:321
static const int DO_NOT_SET_LINE_WIDTH
Definition plotter.h:136
virtual void ThickSegment(const VECTOR2I &start, const VECTOR2I &end, int width, void *aData)
Definition plotter.cpp:536
virtual void PlotText(const VECTOR2I &aPos, const COLOR4D &aColor, const wxString &aText, const TEXT_ATTRIBUTES &aAttributes, KIFONT::FONT *aFont=nullptr, const KIFONT::METRICS &aFontMetrics=KIFONT::METRICS::Default(), void *aData=nullptr)
Definition plotter.cpp:712
void markerLozenge(const VECTOR2I &position, int radius)
Plot a lozenge centered on the position.
Definition plotter.cpp:306
virtual void PlotPoly(const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth, void *aData)=0
Draw a polygon ( filled or not ).
virtual void ThickRect(const VECTOR2I &p1, const VECTOR2I &p2, int width, void *aData)
Definition plotter.cpp:603
virtual void FlashPadCircle(const VECTOR2I &aPadPos, int aDiameter, void *aData)=0
RENDER_SETTINGS * m_renderSettings
Definition plotter.h:722
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:642
void markerBackSlash(const VECTOR2I &pos, int radius)
Plot a \ bar centered on the position.
Definition plotter.cpp:347
virtual void SetSubject(const wxString &aSubject)
Definition plotter.h:188
int GetPlotterArcLowDef() const
Definition plotter.h:270
bool m_negativeMode
Definition plotter.h:707
void SetPlotMirrored(bool aMirror)
Definition plotter.h:169
virtual void HyperlinkMenu(const BOX2I &aBox, const std::vector< wxString > &aDestURLs)
Create a clickable hyperlink menu with a rectangular click area.
Definition plotter.h:514
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:554
double m_IUsPerDecimil
Definition plotter.h:692
void markerVBar(const VECTOR2I &pos, int radius)
Plot a | bar centered on the position.
Definition plotter.cpp:354
wxString m_title
Definition plotter.h:714
void markerSquare(const VECTOR2I &position, int radius)
Plot a square centered on the position.
Definition plotter.cpp:272
virtual void ThickCircle(const VECTOR2I &pos, int diametre, int width, void *aData)
Definition plotter.cpp:609
virtual int GetCurrentLineWidth() const
Definition plotter.h:179
bool m_colorMode
Definition plotter.h:706
double GetDashMarkLenIU(int aLineWidth) const
Definition plotter.cpp:136
virtual void SetColor(const COLOR4D &color)=0
wxString m_filename
Definition plotter.h:713
virtual void Arc(const VECTOR2D &aStart, const VECTOR2D &aMid, const VECTOR2D &aEnd, FILL_T aFill, int aWidth)
Definition plotter.cpp:148
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:596
virtual DXF_OUTLINE_MODE GetDXFPlotMode() const
Definition plotter.h:106
virtual PLOT_TEXT_MODE GetTextMode() const
Definition plotter.h:107
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:37
FILL_T
Definition eda_shape.h:59
static const bool FILLED
Definition gr_basic.cpp:30
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
DXF_UNITS
Definition plotter.h:48
PLOT_TEXT_MODE
Which kind of text to output with the PSLIKE plotters.
Definition plotter.h:96
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Return the default plot extension for a format.
DXF_LAYER_OUTPUT_MODE
Specifies the output mode for the DXF layer.
Definition plotter.h:119
DXF_OUTLINE_MODE
Options to draw items with thickness ( segments, arcs, circles, texts...)
Definition plotter.h:77
@ SKETCH
Definition plotter.h:78
@ FILLED
Definition plotter.h:79
PLOT_FORMAT
The set of supported output plot formats.
Definition plotter.h:60
@ LAST_FORMAT
Definition plotter.h:70
@ FIRST_FORMAT
Definition plotter.h:62
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, const wxString &aVariantName=wxEmptyString, const wxString &aVariantDesc=wxEmptyString)
@ INCH
Definition rs274x.cpp:58
LINE_STYLE
Dashed line types.
static const long long MM
int radius
VECTOR2I end
GR_TEXT_H_ALIGN_T
This is API surface mapped to common.types.HorizontalAlignment.
GR_TEXT_V_ALIGN_T
This is API surface mapped to common.types.VertialAlignment.
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683
VECTOR2< double > VECTOR2D
Definition vector2d.h:682