31 #ifndef PLOT_COMMON_H_ 32 #define PLOT_COMMON_H_ 206 virtual void SetViewport(
const wxPoint& aOffset,
double aIusPerDecimil,
207 double aScale,
bool aMirror ) = 0;
218 virtual bool OpenFile(
const wxString& aFullFilename );
231 virtual void Rect(
const wxPoint& p1,
const wxPoint& p2,
FILL_T fill,
233 virtual void Circle(
const wxPoint& pos,
int diametre,
FILL_T fill,
239 virtual void Arc(
const wxPoint& centre,
double StAngle,
double EndAngle,
int rayon,
248 virtual void BezierCurve(
const wxPoint& aStart,
const wxPoint& aControl1,
249 const wxPoint& aControl2,
const wxPoint& aEnd,
260 virtual void PenTo(
const wxPoint& pos,
char plume ) = 0;
282 PenTo( wxPoint( 0, 0 ),
'Z' );
293 virtual void PlotPoly(
const std::vector< wxPoint >& aCornerList,
FILL_T aFill,
317 virtual void PlotImage(
const wxImage& aImage,
const wxPoint& aPos,
double aScaleFactor );
320 virtual void ThickSegment(
const wxPoint& start,
const wxPoint& end,
int width,
322 virtual void ThickArc(
const wxPoint& centre,
double StAngle,
double EndAngle,
323 int rayon,
int width,
OUTLINE_MODE tracemode,
void* aData );
324 virtual void ThickRect(
const wxPoint& p1,
const wxPoint& p2,
int width,
326 virtual void ThickCircle(
const wxPoint& pos,
int diametre,
int width,
328 virtual void FilledCircle(
const wxPoint& pos,
int diametre,
340 virtual void FlashPadCircle(
const wxPoint& aPadPos,
int aDiameter,
350 virtual void FlashPadOval(
const wxPoint& aPadPos,
const wxSize& aSize,
double aPadOrient,
360 virtual void FlashPadRect(
const wxPoint& aPadPos,
const wxSize& aSize,
361 double aPadOrient,
OUTLINE_MODE aTraceMode,
void* aData ) = 0;
372 int aCornerRadius,
double aOrient,
383 virtual void FlashPadCustom(
const wxPoint& aPadPos,
const wxSize& aSize,
397 virtual void FlashPadTrapez(
const wxPoint& aPadPos,
const wxPoint *aCorners,
411 virtual void FlashRegularPolygon(
const wxPoint& aShapePos,
int aDiameter,
int aCornerCount,
412 double aOrient,
OUTLINE_MODE aTraceMode,
void* aData ) = 0 ;
420 virtual void Text(
const wxPoint& aPos,
422 const wxString& aText,
430 bool aMultilineAllowed =
false,
431 void* aData =
nullptr );
445 void Marker(
const wxPoint& position,
int diametre,
unsigned aShapeId );
509 void markerHBar(
const wxPoint& pos,
int radius );
514 void markerSlash(
const wxPoint& pos,
int radius );
524 void markerVBar(
const wxPoint& pos,
int radius );
529 void markerSquare(
const wxPoint& position,
int radius );
541 void segmentAsOval(
const wxPoint& start,
const wxPoint& end,
int width,
544 void sketchOval(
const wxPoint& pos,
const wxSize& size,
double orient,
int width );
614 const PAGE_INFO& aPageInfo,
const wxString& aSheetNumber,
int aSheetCount,
615 const wxString& aSheetDesc,
const wxString& aFilename,
616 COLOR4D aColor = COLOR4D::UNSPECIFIED,
bool aIsFirstPage =
true );
623 #endif // PLOT_COMMON_H_ void segmentAsOval(const wxPoint &start, const wxPoint &end, int width, OUTLINE_MODE tracemode)
Convert a thick segment and plot it as an oval.
void FinishTo(const wxPoint &pos)
double GetDotMarkLenIU() const
void markerHBar(const wxPoint &pos, int radius)
Plot a - bar centered on the position.
virtual void SetCreator(const wxString &aCreator)
virtual void FlashPadRoundRect(const wxPoint &aPadPos, const wxSize &aSize, int aCornerRadius, double aOrient, OUTLINE_MODE aTraceMode, void *aData)=0
Container for project specific data.
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...
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
virtual void ThickCircle(const wxPoint &pos, int diametre, int width, OUTLINE_MODE tracemode, void *aData)
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
virtual bool StartPlot()=0
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
Draw a polygon ( filled or not ).
virtual void SetTitle(const wxString &aTitle)
static const unsigned MARKER_COUNT
Draw a marker (used for the drill map).
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
virtual void SetLayerPolarity(bool aPositive)
Set the current Gerber layer polarity to positive or negative by writing %LPD*% or %LPC*% to the Gerb...
virtual void FlashPadOval(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
void SetRenderSettings(RENDER_SETTINGS *aSettings)
FILE * m_outputFile
Output file.
virtual void StartBlock(void *aData)
calling this function allows one to define the beginning of a group of drawing items,...
virtual void PenTo(const wxPoint &pos, char plume)=0
Moveto/lineto primitive, moves the 'pen' to the specified direction.
virtual void ThickRect(const wxPoint &p1, const wxPoint &p2, int width, OUTLINE_MODE tracemode, void *aData)
virtual void FilledCircle(const wxPoint &pos, int diametre, OUTLINE_MODE tracemode, void *aData)
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...
void AddLineToHeader(const wxString &aExtraString)
Add a line to the list of free lines to print at the beginning of the file.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
wxArrayString m_headerExtraLines
virtual void ThickSegment(const wxPoint &start, const wxPoint &end, int width, OUTLINE_MODE tracemode, void *aData)
virtual void SetGerberCoordinatesFormat(int aResolution, bool aUseInches=false)
virtual void SetSvgCoordinatesFormat(unsigned aResolution, bool aUseInches=false)
void PlotDrawingSheet(PLOTTER *plotter, const PROJECT *aProject, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, const wxString &aSheetNumber, int aSheetCount, const wxString &aSheetDesc, const wxString &aFilename, COLOR4D aColor=COLOR4D::UNSPECIFIED, bool aIsFirstPage=true)
virtual void FlashPadTrapez(const wxPoint &aPadPos, const wxPoint *aCorners, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
Flash a trapezoidal pad.
double GetDashGapLenIU() const
double m_plotScale
Plot scale - chosen by the user (even implicitly with 'fit in a4')
virtual int GetCurrentLineWidth() const
void LineTo(const wxPoint &pos)
static const int USE_DEFAULT_LINE_WIDTH
virtual void FlashPadRect(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData)=0
Represent a set of closed polygons.
PLOT_FORMAT
The set of supported output plot formats.
virtual PLOT_FORMAT GetPlotterType() const =0
Returns the effective plot engine in use.
Describe the page size and margins of a paper page on which to eventually print or plot.
virtual void SetTextMode(PLOT_TEXT_MODE mode)
Change the current text mode.
double GetIUsPerDecimil() const
The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establ...
RENDER_SETTINGS * m_renderSettings
virtual DPOINT userToDeviceSize(const wxSize &size)
Modify size according to the plotter scale factors (wxSize version, returns a DPOINT).
virtual void SetNegative(bool aNegative)
void markerSlash(const wxPoint &pos, int radius)
Plot a / bar centered on the position.
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror)=0
Set the plot offset and scaling for the current plot.
virtual void FlashRegularPolygon(const wxPoint &aShapePos, int aDiameter, int aCornerCount, double aOrient, OUTLINE_MODE aTraceMode, void *aData)=0
Flash a regular polygon.
void Marker(const wxPoint &position, int diametre, unsigned aShapeId)
Draw a pattern shape number aShapeId, to coord position.
virtual void SetColor(const COLOR4D &color)=0
PLOT_DASH_TYPE
Dashed line types.
void MoveTo(const wxPoint &pos)
virtual DPOINT userToDeviceCoordinates(const wxPoint &aCoordinate)
Modify coordinates according to the orientation, scale factor, and offsets trace.
int GetPlotterArcLowDef() const
Base plotter engine class.
virtual void PlotImage(const wxImage &aImage, const wxPoint &aPos, double aScaleFactor)
Only PostScript plotters can plot bitmaps.
RENDER_SETTINGS * RenderSettings()
double GetDashMarkLenIU() const
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void markerLozenge(const wxPoint &position, int radius)
Plot a lozenge centered on the position.
void markerCircle(const wxPoint &pos, int radius)
Plot a circle centered on the position.
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
int GetPlotterArcHighDef() const
void ClearHeaderLinesList()
Remove all lines from the list of free lines to print at the beginning of the file.
virtual void ThickArc(const wxPoint ¢re, double StAngle, double EndAngle, int rayon, int width, OUTLINE_MODE tracemode, void *aData)
virtual void FlashPadCustom(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, SHAPE_POLY_SET *aPolygons, OUTLINE_MODE aTraceMode, void *aData)=0
virtual void Arc(const wxPoint ¢re, double StAngle, double EndAngle, int rayon, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)
Generic fallback: arc rendered as a polyline.
Color settings are a bit different than most of the settings objects in that there can be more than o...
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.
PLOT_TEXT_MODE
Which kind of text to output with the PSLIKE plotters.
static const int DO_NOT_SET_LINE_WIDTH
PAGE_INFO & PageSettings()
void markerVBar(const wxPoint &pos, int radius)
Plot a | bar centered on the position.
void markerSquare(const wxPoint &position, int radius)
Plot a square centered on the position.
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
void markerBackSlash(const wxPoint &pos, int radius)
Plot a \ bar centered on the position.
void sketchOval(const wxPoint &pos, const wxSize &size, double orient, int width)
virtual void Circle(const wxPoint &pos, int diametre, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
virtual void FlashPadCircle(const wxPoint &aPadPos, int aDiameter, OUTLINE_MODE aTraceMode, void *aData)=0
virtual void SetDash(PLOT_DASH_TYPE dashed)=0
bool m_mirrorIsHorizontal
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)
A color representation with 4 components: red, green, blue, alpha.
bool GetColorMode() const