64 virtual void FlashPadCircle(
const wxPoint& aPadPos,
int aDiameter,
66 virtual void FlashPadOval(
const wxPoint& aPadPos,
const wxSize& aSize,
double aPadOrient,
68 virtual void FlashPadRect(
const wxPoint& aPadPos,
const wxSize& aSize,
double aPadOrient,
71 int aCornerRadius,
double aOrient,
73 virtual void FlashPadCustom(
const wxPoint& aPadPos,
const wxSize& aSize,
double aOrient,
76 virtual void FlashPadTrapez(
const wxPoint& aPadPos,
const wxPoint *aCorners,
77 double aPadOrient,
OUTLINE_MODE aTraceMode,
void* aData )
override;
78 virtual void FlashRegularPolygon(
const wxPoint& aShapePos,
int aDiameter,
int aCornerCount,
80 void* aData )
override;
99 const wxString& aText,
108 double *wideningFactor,
115 double *heightFactor );
124 std::vector<int> *pos_pairs );
164 return wxString( wxT(
"ps" ) );
186 virtual bool EndPlot()
override;
198 virtual void SetViewport(
const wxPoint& aOffset,
double aIusPerDecimil,
199 double aScale,
bool aMirror )
override;
200 virtual void Rect(
const wxPoint& p1,
const wxPoint& p2,
FILL_T fill,
202 virtual void Circle(
const wxPoint& pos,
int diametre,
FILL_T fill,
204 virtual void Arc(
const wxPoint& centre,
double StAngle,
double EndAngle,
int rayon,
207 virtual void PlotPoly(
const std::vector< wxPoint >& aCornerList,
FILL_T aFill,
213 virtual void PlotImage(
const wxImage& aImage,
const wxPoint& aPos,
214 double aScaleFactor )
override;
216 virtual void PenTo(
const wxPoint& pos,
char plume )
override;
217 virtual void Text(
const wxPoint& aPos,
219 const wxString& aText,
227 bool aMultilineAllowed =
false,
228 void* aData =
nullptr )
override;
253 return wxString( wxT(
"pdf" ) );
265 virtual bool OpenFile(
const wxString& aFullFilename )
override;
272 virtual bool EndPlot()
override;
303 virtual void SetViewport(
const wxPoint& aOffset,
double aIusPerDecimil,
304 double aScale,
bool aMirror )
override;
309 virtual void Rect(
const wxPoint& p1,
const wxPoint& p2,
FILL_T fill,
315 virtual void Circle(
const wxPoint& pos,
int diametre,
FILL_T fill,
322 virtual void Arc(
const wxPoint& centre,
double StAngle,
double EndAngle,
int rayon,
328 virtual void PlotPoly(
const std::vector< wxPoint >& aCornerList,
FILL_T aFill,
331 virtual void PenTo(
const wxPoint& pos,
char plume )
override;
333 virtual void Text(
const wxPoint& aPos,
335 const wxString& aText,
343 bool aMultilineAllowed =
false,
344 void* aData =
nullptr )
override;
348 virtual void PlotImage(
const wxImage& aImage,
const wxPoint& aPos,
349 double aScaleFactor )
override;
417 return wxString( wxT(
"svg" ) );
431 virtual bool EndPlot()
override;
443 virtual void SetViewport(
const wxPoint& aOffset,
double aIusPerDecimil,
444 double aScale,
bool aMirror )
override;
445 virtual void Rect(
const wxPoint& p1,
const wxPoint& p2,
FILL_T fill,
447 virtual void Circle(
const wxPoint& pos,
int diametre,
FILL_T fill,
449 virtual void Arc(
const wxPoint& centre,
double StAngle,
double EndAngle,
int rayon,
452 virtual void BezierCurve(
const wxPoint& aStart,
const wxPoint& aControl1,
453 const wxPoint& aControl2,
const wxPoint& aEnd,
457 virtual void PlotPoly(
const std::vector< wxPoint >& aCornerList,
FILL_T aFill,
463 virtual void PlotImage(
const wxImage& aImage,
const wxPoint& aPos,
464 double aScaleFactor )
override;
466 virtual void PenTo(
const wxPoint& pos,
char plume )
override;
486 virtual void StartBlock(
void* aData )
override;
493 virtual void EndBlock(
void* aData )
override;
495 virtual void Text(
const wxPoint& aPos,
497 const wxString& aText,
505 bool aMultilineAllowed =
false,
506 void* aData =
nullptr )
override;
521 void setSVGPlotStyle(
bool aIsGroup =
true,
const std::string& aExtraStyle = {} );
static wxString GetDefaultFileExtension()
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
void closePdfStream()
Finish the current PDF stream (writes the deferred length, too)
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
virtual void SetDash(PLOT_DASH_TYPE dashed) override
SVG supports dashed lines.
static wxString GetDefaultFileExtension()
virtual void PlotImage(const wxImage &aImage, const wxPoint &aPos, double aScaleFactor) override
PostScript-likes at the moment are the only plot engines supporting bitmaps.
virtual PLOT_FORMAT GetPlotterType() const override
Returns the effective plot engine in use.
virtual void SetSvgCoordinatesFormat(unsigned aResolution, bool aUseInches=false) override
Select SVG step size (number of digits needed for 1 mm or 1 inch )
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
virtual bool EndPlot() override
virtual void emitSetRGBColor(double r, double g, double b) override
Virtual primitive for emitting the setrgbcolor operator.
void setFillMode(FILL_T fill)
Prepare parameters for setSVGPlotStyle()
virtual void StartPage()
Start a new page in the PDF document.
static wxString GetDefaultFileExtension()
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) override
Draw text with the plotter.
virtual void PenTo(const wxPoint &pos, char plume) override
Moveto/lineto primitive, moves the 'pen' to the specified direction.
void SetScaleAdjust(double scaleX, double scaleY)
Set the 'fine' scaling for the postscript engine.
The PSLIKE_PLOTTER class is an intermediate class to handle common routines for engines working more ...
virtual void PenTo(const wxPoint &pos, char plume) override
Moveto/lineto primitive, moves the 'pen' to the specified direction.
virtual bool EndPlot() override
virtual void PenTo(const wxPoint &pos, char plume) override
Moveto/lineto primitive, moves the 'pen' to the specified direction.
void setSVGPlotStyle(bool aIsGroup=true, const std::string &aExtraStyle={})
Output the string which define pen and brush color, shape, transparency.
virtual void FlashPadRect(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData) override
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) override
Draw text with the plotter.
std::vector< int > pageHandles
Font resource dictionary.
virtual void SetCurrentLineWidth(int width, void *aData=nullptr) override
Set the current line width (in IUs) for the next plot.
virtual void SetDash(PLOT_DASH_TYPE dashed) override
PDF supports dashed lines.
PLOT_TEXT_MODE m_textMode
How to draw text.
virtual void SetColor(const COLOR4D &color) override
The SetColor implementation is split with the subclasses: The PSLIKE computes the rgb values,...
virtual std::string encodeStringForPlotter(const wxString &aUnicode)
convert a wxString unicode string to a char string compatible with the accepted string plotter format...
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
wxString workFilename
Handle to the deferred stream length.
virtual void FlashRegularPolygon(const wxPoint &aShapePos, int aDiameter, int aCornerCount, double aOrient, OUTLINE_MODE aTraceMode, void *aData) override
Flash a regular polygon.
virtual bool EndPlot() override
virtual void ClosePage()
Close the current page in the PDF document (and emit its compressed stream).
int streamLengthHandle
Handle of the page content object.
virtual bool StartPlot() override
The code within this function (and the CloseFilePS function) creates postscript files whose contents ...
virtual void FlashPadCircle(const wxPoint &aPadPos, int aDiameter, OUTLINE_MODE aTraceMode, void *aData) override
static const int USE_DEFAULT_LINE_WIDTH
virtual void SetColor(const COLOR4D &color) override
The SetColor implementation is split with the subclasses: The PSLIKE computes the rgb values,...
virtual void FlashPadTrapez(const wxPoint &aPadPos, const wxPoint *aCorners, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData) override
Flash a trapezoidal pad.
virtual void emitSetRGBColor(double r, double g, double b)=0
Virtual primitive for emitting the setrgbcolor operator.
virtual void SetTextMode(PLOT_TEXT_MODE mode) override
PS and PDF fully implement native text (for the Latin-1 subset)
Represent a set of closed polygons.
virtual void Arc(const wxPoint ¢re, double StAngle, double EndAngle, int rayon, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
The PDF engine can't directly plot arcs, it uses the base emulation.
int returnPostscriptTextWidth(const wxString &aText, int aXSize, bool aItalic, bool aBold)
Sister function for the GraphicTextWidth in drawtxt.cpp Does the same processing (i....
int startPdfStream(int handle=-1)
Starts a PDF stream (for the page).
PLOT_FORMAT
The set of supported output plot formats.
virtual void Arc(const wxPoint ¢re, double StAngle, double EndAngle, int rayon, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
Generic fallback: arc rendered as a polyline.
int startPdfObject(int handle=-1)
Open a new PDF object and returns the handle if the parameter is -1.
virtual void Arc(const wxPoint ¢re, double StAngle, double EndAngle, int rayon, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
Generic fallback: arc rendered as a polyline.
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
PDF can have multiple pages, so SetPageSettings can be called with the outputFile open (but not insid...
virtual void Circle(const wxPoint &pos, int diametre, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
std::string encodeStringForPlotter(const wxString &aUnicode) override
convert a wxString unicode string to a char string compatible with the accepted string PDF format (co...
virtual bool StartPlot() override
Create SVG file header.
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr) override
Polygon plotting for PDF.
void closePdfObject()
Close the current PDF object.
virtual void Circle(const wxPoint &pos, int diametre, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr) override
Draw a polygon ( filled or not ).
PLOT_DASH_TYPE
Dashed line types.
static const double postscriptTextAscent
Height of the postscript font (from the AFM)
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
Rectangles in PDF.
int fontResDictHandle
Handle to the root of the page tree object.
virtual PLOT_FORMAT GetPlotterType() const override
Returns the effective plot engine in use.
Base plotter engine class.
virtual void PlotImage(const wxImage &aImage, const wxPoint &aPos, double aScaleFactor) override
PostScript-likes at the moment are the only plot engines supporting bitmaps.
virtual void emitSetRGBColor(double r, double g, double b) override
PDF supports colors fully.
std::vector< long > xrefTable
Temporary file to construct the stream before zipping.
virtual void SetCurrentLineWidth(int width, void *aData=nullptr) override
Set the current line width (in IUs) for the next plot.
virtual void FlashPadRoundRect(const wxPoint &aPadPos, const wxSize &aSize, int aCornerRadius, double aOrient, OUTLINE_MODE aTraceMode, void *aData) override
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
virtual void SetCurrentLineWidth(int width, void *aData=nullptr) override
Pen width setting for PDF.
virtual void Circle(const wxPoint &pos, int diametre, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH) override
Circle drawing for PDF.
double plotScaleAdjX
Fine user scale adjust ( = 1.0 if no correction)
virtual void FlashPadCustom(const wxPoint &aPadPos, const wxSize &aSize, double aOrient, SHAPE_POLY_SET *aPolygons, OUTLINE_MODE aTraceMode, void *aData) override
virtual void EndBlock(void *aData) override
Calling this function allows one to define the end of a group of drawing items the group is started b...
virtual void emitSetRGBColor(double r, double g, double b) override
Initialize m_pen_rgb_color from reduced values r, g ,b ( reduced values are 0.0 to 1....
void postscriptOverlinePositions(const wxString &aText, int aXSize, bool aItalic, bool aBold, std::vector< int > *pos_pairs)
Computes the x coordinates for the overlining in a string of text.
virtual bool OpenFile(const wxString &aFullFilename) override
Open or create the plot file aFullFilename.
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) override
Draw text with the plotter.
virtual void StartBlock(void *aData) override
Calling this function allows one to define the beginning of a group of drawing items (used in SVG for...
void computeTextParameters(const wxPoint &aPos, const wxString &aText, int aOrient, const wxSize &aSize, bool aMirror, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, double *wideningFactor, double *ctm_a, double *ctm_b, double *ctm_c, double *ctm_d, double *ctm_e, double *ctm_f, double *heightFactor)
This is the core for postscript/PDF text alignment.
PLOT_TEXT_MODE
Which kind of text to output with the PSLIKE plotters.
virtual bool StartPlot() override
The PDF engine supports multiple pages; the first one is opened 'for free' the following are to be cl...
virtual PLOT_FORMAT GetPlotterType() const override
Returns the effective plot engine in use.
int allocPdfObject()
Allocate a new handle in the table of the PDF object.
int pageStreamHandle
Handles to the page objects.
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr) override
Draw a polygon ( filled or not ).
virtual void BezierCurve(const wxPoint &aStart, const wxPoint &aControl1, const wxPoint &aControl2, const wxPoint &aEnd, int aTolerance, int aLineThickness=USE_DEFAULT_LINE_WIDTH) override
Generic fallback: Cubic Bezier curve rendered as a polyline In KiCad the bezier curves have 4 control...
virtual void FlashPadOval(const wxPoint &aPadPos, const wxSize &aSize, double aPadOrient, OUTLINE_MODE aTraceMode, void *aData) override
virtual void SetDash(PLOT_DASH_TYPE dashed) override
PostScript supports dashed lines.
A color representation with 4 components: red, green, blue, alpha.
virtual void PlotImage(const wxImage &aImage, const wxPoint &aPos, double aScaleFactor) override
PDF images are handles as inline, not XObject streams...