KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PDF_PLOTTER Class Reference

#include <plotters_pslike.h>

Inheritance diagram for PDF_PLOTTER:
PSLIKE_PLOTTER PLOTTER

Classes

struct  OUTLINE_NODE
 
struct  OverbarInfo
 

Public Member Functions

 PDF_PLOTTER (const PROJECT *aProject=nullptr)
 
virtual ~PDF_PLOTTER ()
 
virtual PLOT_FORMAT GetPlotterType () const override
 Return the effective plot engine in use.
 
virtual bool OpenFile (const wxString &aFullFilename) override
 Open or create the plot file aFullFilename.
 
virtual bool StartPlot (const wxString &aPageNumber) override
 The PDF engine supports multiple pages; the first one is opened 'for free' the following are to be closed and reopened.
 
virtual bool StartPlot (const wxString &aPageNumber, const wxString &aPageName=wxEmptyString)
 
virtual bool EndPlot () override
 
virtual void StartPage (const wxString &aPageNumber, const wxString &aPageName=wxEmptyString, const wxString &aParentPageNumber=wxEmptyString, const wxString &aParentPageName=wxEmptyString)
 Start a new page in the PDF document.
 
virtual void ClosePage ()
 Close the current page in the PDF document (and emit its compressed stream).
 
virtual void SetCurrentLineWidth (int width, void *aData=nullptr) override
 Pen width setting for PDF.
 
virtual void SetDash (int aLineWidth, LINE_STYLE aLineStyle) override
 PDF supports dashed lines.
 
virtual void SetViewport (const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
 PDF can have multiple pages, so SetPageSettings can be called with the outputFile open (but not inside a page stream!)
 
virtual void Rect (const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width, int aCornerRadius=0) override
 Rectangles in PDF.
 
virtual void Circle (const VECTOR2I &pos, int diametre, FILL_T fill, int width) override
 Circle drawing for PDF.
 
virtual void Arc (const VECTOR2D &aCenter, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle, double aRadius, FILL_T aFill, int aWidth) override
 The PDF engine can't directly plot arcs so we use polygonization.
 
virtual void PlotPoly (const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr) override
 Polygon plotting for PDF.
 
virtual void PlotPoly (const SHAPE_LINE_CHAIN &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr) override
 Draw a polygon ( filled or not ).
 
virtual void PenTo (const VECTOR2I &pos, char plume) override
 Moveto/lineto primitive, moves the 'pen' to the specified direction.
 
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 aWidth, bool aItalic, bool aBold, bool aMultilineAllowed, KIFONT::FONT *aFont, const KIFONT::METRICS &aFontMetrics, void *aData=nullptr) override
 Draw text with the plotter.
 
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) override
 
void HyperlinkBox (const BOX2I &aBox, const wxString &aDestinationURL) override
 Create a clickable hyperlink with a rectangular click area.
 
void HyperlinkMenu (const BOX2I &aBox, const std::vector< wxString > &aDestURLs) override
 Create a clickable hyperlink menu with a rectangular click area.
 
void Bookmark (const BOX2I &aBox, const wxString &aName, const wxString &aGroupName=wxEmptyString) override
 Create a bookmark to a symbol.
 
void Plot3DModel (const wxString &aSourcePath, const std::vector< PDF_3D_VIEW > &a3DViews)
 
void Set3DExport (bool aYes)
 
void PlotImage (const wxImage &aImage, const VECTOR2I &aPos, double aScaleFactor) override
 PDF images are handles as inline, not XObject streams...
 
virtual void SetTextMode (PLOT_TEXT_MODE mode) override
 PS and PDF fully implement native text (for the Latin-1 subset)
 
void SetScaleAdjust (double scaleX, double scaleY)
 Set the 'fine' scaling for the postscript engine.
 
virtual void FlashPadCircle (const VECTOR2I &aPadPos, int aDiameter, void *aData) override
 
virtual void FlashPadOval (const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, void *aData) override
 
virtual void FlashPadRect (const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, void *aData) override
 
virtual void FlashPadRoundRect (const VECTOR2I &aPadPos, const VECTOR2I &aSize, int aCornerRadius, const EDA_ANGLE &aOrient, void *aData) override
 
virtual void FlashPadCustom (const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, SHAPE_POLY_SET *aPolygons, void *aData) override
 
virtual void FlashPadTrapez (const VECTOR2I &aPadPos, const VECTOR2I *aCorners, const EDA_ANGLE &aPadOrient, void *aData) override
 Flash a trapezoidal pad.
 
virtual void FlashRegularPolygon (const VECTOR2I &aShapePos, int aDiameter, int aCornerCount, const EDA_ANGLE &aOrient, void *aData) override
 Flash a regular polygon.
 
virtual void SetColor (const COLOR4D &color) override
 The SetColor implementation is split with the subclasses: the PSLIKE computes the rgb values, the subclass emits the operator to actually do it.
 
virtual void SetNegative (bool aNegative)
 
virtual void SetColorMode (bool aColorMode)
 Plot in B/W or color.
 
bool GetColorMode () const
 
void SetRenderSettings (RENDER_SETTINGS *aSettings)
 
RENDER_SETTINGSRenderSettings ()
 
virtual void SetPageSettings (const PAGE_INFO &aPageSettings)
 
PAGE_INFOPageSettings ()
 
void SetPlotMirrored (bool aMirror)
 
bool GetPlotMirrored () const
 
virtual int GetCurrentLineWidth () const
 
virtual void SetCreator (const wxString &aCreator)
 
virtual void SetTitle (const wxString &aTitle)
 
virtual void SetAuthor (const wxString &aAuthor)
 
virtual void SetSubject (const wxString &aSubject)
 
void AddLineToHeader (const wxString &aExtraString)
 Add a line to the list of free lines to print at the beginning of the file.
 
void ClearHeaderLinesList ()
 Remove all lines from the list of free lines to print at the beginning of the file.
 
double GetIUsPerDecimil () const
 The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establishing the viewport.
 
int GetPlotterArcLowDef () const
 
int GetPlotterArcHighDef () const
 
virtual void Arc (const VECTOR2D &aStart, const VECTOR2D &aMid, const VECTOR2D &aEnd, FILL_T aFill, int aWidth)
 
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.
 
void MoveTo (const VECTOR2I &pos)
 
void LineTo (const VECTOR2I &pos)
 
void FinishTo (const VECTOR2I &pos)
 
void PenFinish ()
 
virtual void ThickSegment (const VECTOR2I &start, const VECTOR2I &end, int width, void *aData)
 
virtual void ThickArc (const EDA_SHAPE &aArcShape, void *aData, int aWidth)
 
virtual void ThickArc (const VECTOR2D &aCentre, const EDA_ANGLE &aStAngle, const EDA_ANGLE &aAngle, double aRadius, int aWidth, void *aData)
 
virtual void ThickRect (const VECTOR2I &p1, const VECTOR2I &p2, int width, void *aData)
 
virtual void ThickCircle (const VECTOR2I &pos, int diametre, int width, void *aData)
 
virtual void FilledCircle (const VECTOR2I &pos, int diametre, void *aData)
 
virtual void ThickOval (const VECTOR2I &aPos, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, int aWidth, void *aData)
 
virtual void ThickPoly (const SHAPE_POLY_SET &aPoly, int aWidth, void *aData)
 
void Marker (const VECTOR2I &position, int diametre, unsigned aShapeId)
 Draw a pattern shape number aShapeId, to coord position.
 
virtual void SetLayerPolarity (bool aPositive)
 Set the current Gerber layer polarity to positive or negative by writing %LPD*% or %LPC*% to the Gerber file, respectively.
 
virtual void SetGerberCoordinatesFormat (int aResolution, bool aUseInches=false)
 
virtual void SetSvgCoordinatesFormat (unsigned aPrecision)
 Set the number of digits for mantissa in coordinates in mm for SVG plotter.
 
virtual void StartBlock (void *aData)
 calling this function allows one to define the beginning of a group of drawing items, for instance in SVG or Gerber format.
 
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 Gerber format.
 
VECTOR2I GetPlotOffsetUserUnits ()
 

Static Public Member Functions

static wxString GetDefaultFileExtension ()
 
static std::vector< float > CreateC2WMatrixFromAngles (const VECTOR3D &aTargetPosition, float aCameraDistance, float aYawDegrees, float aPitchDegrees, float aRollDegrees)
 Generates the camera to world matrix for use with a 3D View.
 

Static Public Attributes

static const int DO_NOT_SET_LINE_WIDTH = -2
 
static const int USE_DEFAULT_LINE_WIDTH = -1
 
static const unsigned MARKER_COUNT = 58
 Draw a marker (used for the drill map).
 

Protected Member Functions

OUTLINE_NODEaddOutlineNode (OUTLINE_NODE *aParent, int aActionHandle, const wxString &aTitle)
 Add a new outline node entry.
 
std::string encodeStringForPlotter (const wxString &aUnicode) override
 convert a wxString unicode string to a char string compatible with the accepted string PDF format (convert special chars and non ascii7 chars)
 
virtual void emitSetRGBColor (double r, double g, double b, double a) override
 PDF supports colors fully.
 
int allocPdfObject ()
 Allocate a new handle in the table of the PDF object.
 
int startPdfObject (int aHandle=-1)
 Open a new PDF object and returns the handle if the parameter is -1.
 
void closePdfObject ()
 Close the current PDF object.
 
int startPdfStream (int aHandle=-1)
 Start a PDF stream (for the page).
 
void closePdfStream ()
 Finish the current PDF stream (writes the deferred length, too).
 
int emitOutline ()
 Starts emitting the outline object.
 
void emitOutlineNode (OUTLINE_NODE *aNode, int aParentHandle, int aNextNode, int aPrevNode)
 Emits a outline item object and recurses into any children.
 
int emitGoToAction (int aPageHandle, const VECTOR2I &aBottomLeft, const VECTOR2I &aTopRight)
 Emit an action object that instructs a goto coordinates on a page.
 
int emitGoToAction (int aPageHandle)
 
void endPlotEmitResources ()
 
void emitStrokeFonts ()
 
void emitOutlineFonts ()
 
std::string encodeByteString (const std::string &aBytes)
 
void computeTextParameters (const VECTOR2I &aPos, const wxString &aText, const EDA_ANGLE &aOrient, const VECTOR2I &aSize, bool aMirror, enum GR_TEXT_H_ALIGN_T aH_justify, enum GR_TEXT_V_ALIGN_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.
 
int returnPostscriptTextWidth (const wxString &aText, int aXSize, bool aItalic, bool aBold)
 Sister function for the GRTextWidth in gr_text.cpp Does the same processing (i.e.
 
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.
 
void markerCircle (const VECTOR2I &pos, int radius)
 Plot a circle centered on the position.
 
void markerHBar (const VECTOR2I &pos, int radius)
 Plot a - bar centered on the position.
 
void markerSlash (const VECTOR2I &pos, int radius)
 Plot a / bar centered on the position.
 
void markerBackSlash (const VECTOR2I &pos, int radius)
 Plot a \ bar centered on the position.
 
void markerVBar (const VECTOR2I &pos, int radius)
 Plot a | bar centered on the position.
 
void markerSquare (const VECTOR2I &position, int radius)
 Plot a square centered on the position.
 
void markerLozenge (const VECTOR2I &position, int radius)
 Plot a lozenge centered on the position.
 
virtual VECTOR2D userToDeviceCoordinates (const VECTOR2I &aCoordinate)
 Modify coordinates according to the orientation, scale factor, and offsets trace.
 
virtual VECTOR2D userToDeviceSize (const VECTOR2I &size)
 Modify size according to the plotter scale factors (VECTOR2I version, returns a VECTOR2D).
 
virtual double userToDeviceSize (double size) const
 Modify size according to the plotter scale factors (simple double version).
 
double GetDotMarkLenIU (int aLineWidth) const
 
double GetDashMarkLenIU (int aLineWidth) const
 
double GetDashGapLenIU (int aLineWidth) const
 

Protected Attributes

int m_pageTreeHandle
 Handle to the root of the page tree object.
 
int m_fontResDictHandle
 Font resource dictionary.
 
int m_imgResDictHandle
 Image resource dictionary.
 
int m_jsNamesHandle
 Handle for Names dictionary with JS.
 
std::vector< int > m_pageHandles
 Handles to the page objects.
 
int m_pageStreamHandle
 Handle of the page content object.
 
int m_streamLengthHandle
 Handle to the deferred stream length.
 
wxString m_workFilename
 
wxString m_pageName
 
wxString m_parentPageName
 
FILE * m_workFile
 Temporary file to construct the stream before zipping.
 
std::vector< long > m_xrefTable
 The PDF xref offset table.
 
std::vector< wxString > m_pageNumbers
 List of user-space page numbers for resolving internal hyperlinks.
 
std::vector< std::pair< BOX2I, wxString > > m_hyperlinksInPage
 List of loaded hyperlinks in current page.
 
std::vector< std::pair< BOX2I, std::vector< wxString > > > m_hyperlinkMenusInPage
 
std::map< int, std::pair< BOX2D, wxString > > m_hyperlinkHandles
 Handles for all the hyperlink objects that will be deferred.
 
std::map< int, std::pair< BOX2D, std::vector< wxString > > > m_hyperlinkMenuHandles
 
std::map< wxString, std::vector< std::pair< BOX2I, wxString > > > m_bookmarksInPage
 
std::map< int, wxImage > m_imageHandles
 
std::unique_ptr< OUTLINE_NODEm_outlineRoot
 Root outline node.
 
int m_totalOutlineNodes
 Total number of outline nodes.
 
int m_3dModelHandle
 
bool m_3dExportMode
 
std::unique_ptr< PDF_STROKE_FONT_MANAGERm_strokeFontManager
 
std::unique_ptr< PDF_OUTLINE_FONT_MANAGERm_outlineFontManager
 
double plotScaleAdjX
 Fine user scale adjust ( = 1.0 if no correction)
 
double plotScaleAdjY
 
PLOT_TEXT_MODE m_textMode
 How to draw text.
 
double m_plotScale
 Plot scale - chosen by the user (even implicitly with 'fit in a4')
 
double m_IUsPerDecimil
 
double m_iuPerDeviceUnit
 
VECTOR2I m_plotOffset
 
bool m_plotMirror
 
bool m_mirrorIsHorizontal
 
bool m_yaxisReversed
 
FILE * m_outputFile
 Output file.
 
bool m_colorMode
 
bool m_negativeMode
 
int m_currentPenWidth
 
char m_penState
 
VECTOR2I m_penLastpos
 
wxString m_creator
 
wxString m_filename
 
wxString m_title
 
wxString m_author
 
wxString m_subject
 
PAGE_INFO m_pageInfo
 
VECTOR2I m_paperSize
 
wxArrayString m_headerExtraLines
 
RENDER_SETTINGSm_renderSettings
 
const PROJECTm_project
 

Static Protected Attributes

static const double postscriptTextAscent = 0.718
 Height of the postscript font (from the AFM)
 

Private Member Functions

VECTOR2I renderWord (const wxString &aWord, const VECTOR2I &aPosition, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, bool aTextMirrored, int aWidth, bool aBold, bool aItalic, KIFONT::FONT *aFont, const KIFONT::METRICS &aFontMetrics, enum GR_TEXT_V_ALIGN_T aV_justify, TEXT_STYLE_FLAGS aTextStyle)
 Render a single word with the given style parameters.
 
VECTOR2I renderMarkupNode (const MARKUP::NODE *aNode, const VECTOR2I &aPosition, const VECTOR2I &aBaseSize, const EDA_ANGLE &aOrient, bool aTextMirrored, int aWidth, bool aBaseBold, bool aBaseItalic, KIFONT::FONT *aFont, const KIFONT::METRICS &aFontMetrics, enum GR_TEXT_V_ALIGN_T aV_justify, TEXT_STYLE_FLAGS aTextStyle, std::vector< OverbarInfo > &aOverbars)
 Recursively render markup nodes with appropriate styling.
 
void drawOverbars (const std::vector< OverbarInfo > &aOverbars, const EDA_ANGLE &aOrient, const KIFONT::METRICS &aFontMetrics)
 Draw overbar lines above text.
 

Detailed Description

Definition at line 250 of file plotters_pslike.h.

Constructor & Destructor Documentation

◆ PDF_PLOTTER()

◆ ~PDF_PLOTTER()

PDF_PLOTTER::~PDF_PLOTTER ( )
virtualdefault

Member Function Documentation

◆ AddLineToHeader()

void PLOTTER::AddLineToHeader ( const wxString & aExtraString)
inlineinherited

Add a line to the list of free lines to print at the beginning of the file.

Parameters
aExtraStringis the string to print

Definition at line 183 of file plotter.h.

References m_headerExtraLines.

Referenced by AddGerberX2Attribute(), AddGerberX2Header(), GERBER_WRITER::createDrillFile(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), GERBER_WRITER::createProtectionFile(), and GENDRILL_WRITER_BASE::genDrillMapFile().

◆ addOutlineNode()

PDF_PLOTTER::OUTLINE_NODE * PDF_PLOTTER::addOutlineNode ( OUTLINE_NODE * aParent,
int aActionHandle,
const wxString & aTitle )
protected

Add a new outline node entry.

The PDF object handle is automatically allocated.

Parameters
aParentParent node to append the new node to.
aActionHandleThe handle of an action that may be performed on click, set to -1 for no action.
aTitleTitle of node to display

Definition at line 1237 of file PDF_plotter.cpp.

References PDF_PLOTTER::OUTLINE_NODE::AddChild(), allocPdfObject(), and m_totalOutlineNodes.

Referenced by ClosePage().

◆ allocPdfObject()

int PDF_PLOTTER::allocPdfObject ( )
protected

Allocate a new handle in the table of the PDF object.

The handle must be completed using startPdfObject. It's an in-RAM operation only, no output is done.

Definition at line 608 of file PDF_plotter.cpp.

References m_xrefTable.

Referenced by addOutlineNode(), ClosePage(), emitGoToAction(), emitGoToAction(), emitOutline(), endPlotEmitResources(), Plot3DModel(), PlotImage(), startPdfObject(), startPdfStream(), and StartPlot().

◆ Arc() [1/2]

void PDF_PLOTTER::Arc ( const VECTOR2D & aCenter,
const EDA_ANGLE & aStartAngle,
const EDA_ANGLE & aAngle,
double aRadius,
FILL_T aFill,
int aWidth )
overridevirtual

The PDF engine can't directly plot arcs so we use polygonization.

Reimplemented from PLOTTER.

Definition at line 389 of file PDF_plotter.cpp.

References Circle(), DEGREES_T, delta, end, FILLED_SHAPE, PLOTTER::GetCurrentLineWidth(), KiROUND(), m_workFile, NO_FILL, SetCurrentLineWidth(), PLOTTER::userToDeviceCoordinates(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ Arc() [2/2]

void PLOTTER::Arc ( const VECTOR2D & aStart,
const VECTOR2D & aMid,
const VECTOR2D & aEnd,
FILL_T aFill,
int aWidth )
virtualinherited

◆ BezierCurve()

void PLOTTER::BezierCurve ( const VECTOR2I & aStart,
const VECTOR2I & aControl1,
const VECTOR2I & aControl2,
const VECTOR2I & aEnd,
int aTolerance,
int aLineThickness )
virtualinherited

Generic fallback: Cubic Bezier curve rendered as a polyline.

In KiCad the bezier curves have 4 control points: start ctrl1 ctrl2 end

Reimplemented in SVG_PLOTTER.

Definition at line 231 of file plotter.cpp.

References FinishTo(), BEZIER_POLY::GetPoly(), LineTo(), MoveTo(), and SetCurrentLineWidth().

Referenced by SVG_PLOTTER::BezierCurve().

◆ Bookmark()

void PDF_PLOTTER::Bookmark ( const BOX2I & aBox,
const wxString & aName,
const wxString & aGroupName = wxEmptyString )
overridevirtual

Create a bookmark to a symbol.

Parameters
aBoxis the rectangular click target
aSymbolReferenceis the symbol schematic ref

Reimplemented from PLOTTER.

Definition at line 2511 of file PDF_plotter.cpp.

References m_bookmarksInPage.

◆ Circle()

void PDF_PLOTTER::Circle ( const VECTOR2I & pos,
int diametre,
FILL_T fill,
int width )
overridevirtual

Circle drawing for PDF.

They're approximated by curves, but fill is supported

Implements PLOTTER.

Definition at line 333 of file PDF_plotter.cpp.

References FILLED_SHAPE, PLOTTER::GetCurrentLineWidth(), m_workFile, NO_FILL, radius, SetCurrentLineWidth(), PLOTTER::userToDeviceCoordinates(), PLOTTER::userToDeviceSize(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Arc().

◆ ClearHeaderLinesList()

void PLOTTER::ClearHeaderLinesList ( )
inlineinherited

Remove all lines from the list of free lines to print at the beginning of the file.

Definition at line 191 of file plotter.h.

References m_headerExtraLines.

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), and StartPlotBoard().

◆ ClosePage()

◆ closePdfObject()

void PDF_PLOTTER::closePdfObject ( )
protected

◆ closePdfStream()

void PDF_PLOTTER::closePdfStream ( )
protected

Finish the current PDF stream (writes the deferred length, too).

Definition at line 668 of file PDF_plotter.cpp.

References closePdfObject(), ADVANCED_CFG::GetCfg(), ignore_unused(), PLOTTER::m_outputFile, m_streamLengthHandle, m_workFile, m_workFilename, and startPdfObject().

Referenced by ClosePage(), emitOutlineFonts(), and emitStrokeFonts().

◆ computeTextParameters()

void PSLIKE_PLOTTER::computeTextParameters ( const VECTOR2I & aPos,
const wxString & aText,
const EDA_ANGLE & aOrient,
const VECTOR2I & aSize,
bool aMirror,
enum GR_TEXT_H_ALIGN_T aH_justify,
enum GR_TEXT_V_ALIGN_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 )
protectedinherited

This is the core for postscript/PDF text alignment.

It computes the transformation matrix to generate a user space system aligned with the text. Even the PS uses the concat operator to simplify PDF generation (concat is everything PDF has to modify the CTM. Lots of parameters, both in and out.

Definition at line 303 of file PS_plotter.cpp.

References EDA_ANGLE::AsRadians(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_INDETERMINATE, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_INDETERMINATE, GR_TEXT_V_ALIGN_TOP, EDA_ANGLE::Invert(), PLOTTER::m_plotMirror, postscriptTextAscent, returnPostscriptTextWidth(), RotatePoint(), PLOTTER::userToDeviceCoordinates(), PLOTTER::userToDeviceSize(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PDF_PLOTTER::renderWord().

◆ CreateC2WMatrixFromAngles()

std::vector< float > PDF_PLOTTER::CreateC2WMatrixFromAngles ( const VECTOR3D & aTargetPosition,
float aCameraDistance,
float aYawDegrees,
float aPitchDegrees,
float aRollDegrees )
static

Generates the camera to world matrix for use with a 3D View.

Parameters
aTargetPositionThe position of the target, which is also the camera rotation center
aCameraDistanceThe distance the camera should be set back from the target
aYawDegreesThe yaw angle in degrees
aPitchDegreesThe pitch angle in degrees
aRollDegreesThe roll angle in degrees
Returns
A vector of 12 floats that represent the camera to world matrix in linear form as specified by the PDF Spec 1.7 section 13.6.5

Definition at line 2646 of file PDF_plotter.cpp.

References result, VECTOR3< T >::x, VECTOR3< T >::y, and VECTOR3< T >::z.

Referenced by STEP_PCB_MODEL::WritePDF().

◆ drawOverbars()

void PDF_PLOTTER::drawOverbars ( const std::vector< OverbarInfo > & aOverbars,
const EDA_ANGLE & aOrient,
const KIFONT::METRICS & aFontMetrics )
private

◆ emitGoToAction() [1/2]

int PDF_PLOTTER::emitGoToAction ( int aPageHandle)
protected

◆ emitGoToAction() [2/2]

int PDF_PLOTTER::emitGoToAction ( int aPageHandle,
const VECTOR2I & aBottomLeft,
const VECTOR2I & aTopRight )
protected

Emit an action object that instructs a goto coordinates on a page.

Returns
Generated action handle.

Definition at line 1135 of file PDF_plotter.cpp.

References allocPdfObject(), closePdfObject(), PLOTTER::m_outputFile, startPdfObject(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ClosePage().

◆ emitOutline()

int PDF_PLOTTER::emitOutline ( )
protected

Starts emitting the outline object.

Definition at line 1247 of file PDF_plotter.cpp.

References allocPdfObject(), closePdfObject(), emitOutlineNode(), m_outlineRoot, PLOTTER::m_outputFile, m_totalOutlineNodes, and startPdfObject().

Referenced by EndPlot().

◆ emitOutlineFonts()

void PDF_PLOTTER::emitOutlineFonts ( )
protected

◆ emitOutlineNode()

void PDF_PLOTTER::emitOutlineNode ( OUTLINE_NODE * aNode,
int aParentHandle,
int aNextNode,
int aPrevNode )
protected

◆ emitSetRGBColor()

void PDF_PLOTTER::emitSetRGBColor ( double r,
double g,
double b,
double a )
overrideprotectedvirtual

PDF supports colors fully.

It actually has distinct fill and pen colors, but we set both at the same time.

XXX Keeping them divided could result in a minor optimization in Eeschema filled shapes, but would propagate to all the other plot engines. Also arcs are filled as pies but only the arc is stroked so it would be difficult to handle anyway.

Implements PSLIKE_PLOTTER.

Definition at line 208 of file PDF_plotter.cpp.

References m_workFile.

◆ emitStrokeFonts()

◆ encodeByteString()

std::string PDF_PLOTTER::encodeByteString ( const std::string & aBytes)
protected

Definition at line 127 of file PDF_plotter.cpp.

References result.

Referenced by renderWord().

◆ encodeStringForPlotter()

std::string PDF_PLOTTER::encodeStringForPlotter ( const wxString & aUnicode)
overrideprotectedvirtual

convert a wxString unicode string to a char string compatible with the accepted string PDF format (convert special chars and non ascii7 chars)

Reimplemented from PSLIKE_PLOTTER.

Definition at line 65 of file PDF_plotter.cpp.

References KI_FALLTHROUGH, and result.

Referenced by emitOutlineNode(), EndPlot(), and endPlotEmitResources().

◆ EndBlock()

virtual void PLOTTER::EndBlock ( void * aData)
inlinevirtualinherited

calling this function allows one to define the end of a group of drawing items for instance in SVG or Gerber format.

the group is started by StartBlock()

Parameters
aDatacan define any parameter for most of plotters: do nothing

Reimplemented in GERBER_PLOTTER, and SVG_PLOTTER.

Definition at line 554 of file plotter.h.

Referenced by SCH_SYMBOL::Plot(), and PlotStandardLayer().

◆ EndPlot()

◆ endPlotEmitResources()

◆ FilledCircle()

void PLOTTER::FilledCircle ( const VECTOR2I & pos,
int diametre,
void * aData )
virtualinherited

Reimplemented in DXF_PLOTTER, and GERBER_PLOTTER.

Definition at line 598 of file plotter.cpp.

References Circle(), and FILLED_SHAPE.

Referenced by SCH_LABEL_BASE::Plot().

◆ FinishTo()

◆ FlashPadCircle()

void PSLIKE_PLOTTER::FlashPadCircle ( const VECTOR2I & aPadPos,
int aDiameter,
void * aData )
overridevirtualinherited
Parameters
aPadPosPosition of the shape (center of the rectangle.
aDiameteris the diameter of round pad.
aDatais an auxiliary info (mainly for gerber format attributes).

Implements PLOTTER.

Definition at line 119 of file PS_plotter.cpp.

References PLOTTER::Circle(), and FILLED_SHAPE.

◆ FlashPadCustom()

void PSLIKE_PLOTTER::FlashPadCustom ( const VECTOR2I & aPadPos,
const VECTOR2I & aSize,
const EDA_ANGLE & aPadOrient,
SHAPE_POLY_SET * aPolygons,
void * aData )
overridevirtualinherited
Parameters
aPadPosPosition of the shape.
aSizeis the size of round reference pad.
aPadOrientis the pad rotation, used only with aperture macros (Gerber plotter).
aPolygonsthe shape as polygon set.
aDataan auxiliary info (mainly for gerber format attributes).

Implements PLOTTER.

Definition at line 181 of file PS_plotter.cpp.

References SHAPE_LINE_CHAIN::CPoint(), FILLED_SHAPE, SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PLOTTER::PlotPoly(), SHAPE_LINE_CHAIN::PointCount(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ FlashPadOval()

void PSLIKE_PLOTTER::FlashPadOval ( const VECTOR2I & aPadPos,
const VECTOR2I & aSize,
const EDA_ANGLE & aPadOrient,
void * aData )
overridevirtualinherited
Parameters
aPadPosPosition of the shape (center of the rectangle.
aSizeis the size of oblong shape.
aPadOrientThe rotation of the shape.
aDataan auxiliary info (mainly for gerber format attributes).

Implements PLOTTER.

Definition at line 93 of file PS_plotter.cpp.

References ANGLE_90, delta, PLOTTER::m_outputFile, RotatePoint(), PLOTTER::ThickSegment(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ FlashPadRect()

void PSLIKE_PLOTTER::FlashPadRect ( const VECTOR2I & aPadPos,
const VECTOR2I & aSize,
const EDA_ANGLE & aPadOrient,
void * aData )
overridevirtualinherited
Parameters
aPadPosPosition of the shape (center of the rectangle).
aSizeis the size of rounded rect.
aPadOrientThe rotation of the shape.
aDataan auxiliary info (mainly for gerber format attributes).

Implements PLOTTER.

Definition at line 125 of file PS_plotter.cpp.

References FILLED_SHAPE, PLOTTER::PlotPoly(), RotatePoint(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ FlashPadRoundRect()

void PSLIKE_PLOTTER::FlashPadRoundRect ( const VECTOR2I & aPadPos,
const VECTOR2I & aSize,
int aCornerRadius,
const EDA_ANGLE & aOrient,
void * aData )
overridevirtualinherited
Parameters
aPadPosPosition of the shape (center of the rectangle.
aSizeis the size of rounded rect.
aCornerRadiusRadius of the rounded corners.
aOrientThe rotation of the shape.
aDataan auxiliary info (mainly for gerber format attributes).

Implements PLOTTER.

Definition at line 158 of file PS_plotter.cpp.

References SHAPE_LINE_CHAIN::CPoint(), ERROR_INSIDE, FILLED_SHAPE, PLOTTER::GetPlotterArcHighDef(), SHAPE_POLY_SET::Outline(), PLOTTER::PlotPoly(), SHAPE_LINE_CHAIN::PointCount(), TransformRoundChamferedRectToPolygon(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ FlashPadTrapez()

void PSLIKE_PLOTTER::FlashPadTrapez ( const VECTOR2I & aPadPos,
const VECTOR2I * aCorners,
const EDA_ANGLE & aPadOrient,
void * aData )
overridevirtualinherited

Flash a trapezoidal pad.

Parameters
aPadPosis the the position of the shape.
aCornersis the list of 4 corners positions, relative to the shape position, pad orientation 0.
aPadOrientis the rotation of the shape.
aDataan auxiliary info (mainly for gerber format attributes).

Implements PLOTTER.

Definition at line 203 of file PS_plotter.cpp.

References FILLED_SHAPE, PLOTTER::PlotPoly(), and RotatePoint().

◆ FlashRegularPolygon()

void PSLIKE_PLOTTER::FlashRegularPolygon ( const VECTOR2I & aShapePos,
int aDiameter,
int aCornerCount,
const EDA_ANGLE & aOrient,
void * aData )
overridevirtualinherited

Flash a regular polygon.

Useful only in Gerber files to flash a regular polygon.

Parameters
aShapePosis the center of the circle containing the polygon.
aRadiusis the radius of the circle containing the polygon.
aCornerCountis the number of vertices.
aOrientis the polygon rotation.
aDatais a auxiliary parameter used (if needed) to handle extra info specific to the plotter.

Implements PLOTTER.

Definition at line 223 of file PS_plotter.cpp.

◆ GetColorMode()

◆ GetCurrentLineWidth()

◆ GetDashGapLenIU()

double PLOTTER::GetDashGapLenIU ( int aLineWidth) const
protectedinherited

◆ GetDashMarkLenIU()

double PLOTTER::GetDashMarkLenIU ( int aLineWidth) const
protectedinherited

◆ GetDefaultFileExtension()

static wxString PDF_PLOTTER::GetDefaultFileExtension ( )
inlinestatic

Definition at line 277 of file plotters_pslike.h.

Referenced by SCH_PLOTTER::createPDFFile(), and GetDefaultPlotExtension().

◆ GetDotMarkLenIU()

double PLOTTER::GetDotMarkLenIU ( int aLineWidth) const
protectedinherited

◆ GetIUsPerDecimil()

double PLOTTER::GetIUsPerDecimil ( ) const
inlineinherited

The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establishing the viewport.

Here they can be get back again

Definition at line 225 of file plotter.h.

References m_IUsPerDecimil.

Referenced by PlotDrawingSheet().

◆ GetPlotMirrored()

bool PLOTTER::GetPlotMirrored ( ) const
inlineinherited

Definition at line 158 of file plotter.h.

References m_plotMirror.

◆ GetPlotOffsetUserUnits()

VECTOR2I PLOTTER::GetPlotOffsetUserUnits ( )
inlineinherited
Returns
the plot offset in IUs, set by SetViewport() and used to plot items.

Definition at line 559 of file plotter.h.

References m_plotOffset.

Referenced by PlotInteractiveLayer().

◆ GetPlotterArcHighDef()

◆ GetPlotterArcLowDef()

int PLOTTER::GetPlotterArcLowDef ( ) const
inlineinherited

Definition at line 227 of file plotter.h.

References m_IUsPerDecimil.

◆ GetPlotterType()

virtual PLOT_FORMAT PDF_PLOTTER::GetPlotterType ( ) const
inlineoverridevirtual

Return the effective plot engine in use.

It's not very OO but for now is required since some things are only done with some output devices (like drill marks, emitted only for postscript

Implements PLOTTER.

Definition at line 272 of file plotters_pslike.h.

References PDF.

◆ HyperlinkBox()

void PDF_PLOTTER::HyperlinkBox ( const BOX2I & aBox,
const wxString & aDestinationURL )
overridevirtual

Create a clickable hyperlink with a rectangular click area.

Parameters
aBoxis the rectangular click target
aDestinationURLis the target URL

Reimplemented from PLOTTER.

Definition at line 2499 of file PDF_plotter.cpp.

References m_hyperlinksInPage.

◆ HyperlinkMenu()

void PDF_PLOTTER::HyperlinkMenu ( const BOX2I & aBox,
const std::vector< wxString > & aDestURLs )
overridevirtual

Create a clickable hyperlink menu with a rectangular click area.

Parameters
aBoxis the rectangular click target
aDestURLsis the target URL

Reimplemented from PLOTTER.

Definition at line 2505 of file PDF_plotter.cpp.

References m_hyperlinkMenusInPage.

◆ LineTo()

◆ Marker()

void PLOTTER::Marker ( const VECTOR2I & position,
int diametre,
unsigned aShapeId )
inherited

Draw a pattern shape number aShapeId, to coord position.

Parameters
aPositionis the position of the marker.
aDiameteris the diameter of the marker.
aShapeIdis the index (used to generate forms characters).

Definition at line 364 of file plotter.cpp.

References MARKER_COUNT, markerBackSlash(), markerCircle(), markerHBar(), markerLozenge(), markerSlash(), markerSquare(), markerVBar(), and radius.

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), and GENDRILL_WRITER_BASE::plotDrillMarks().

◆ markerBackSlash()

void PLOTTER::markerBackSlash ( const VECTOR2I & pos,
int radius )
protectedinherited

Plot a \ bar centered on the position.

Building block for markers

Definition at line 350 of file plotter.cpp.

References FinishTo(), MoveTo(), radius, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Marker().

◆ markerCircle()

void PLOTTER::markerCircle ( const VECTOR2I & pos,
int radius )
protectedinherited

Plot a circle centered on the position.

Building block for markers

Definition at line 303 of file plotter.cpp.

References Circle(), GetCurrentLineWidth(), NO_FILL, and radius.

Referenced by Marker().

◆ markerHBar()

void PLOTTER::markerHBar ( const VECTOR2I & pos,
int radius )
protectedinherited

Plot a - bar centered on the position.

Building block for markers

Definition at line 336 of file plotter.cpp.

References FinishTo(), MoveTo(), radius, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Marker().

◆ markerLozenge()

void PLOTTER::markerLozenge ( const VECTOR2I & position,
int radius )
protectedinherited

Plot a lozenge centered on the position.

Building block for markers

Definition at line 309 of file plotter.cpp.

References GetCurrentLineWidth(), NO_FILL, PlotPoly(), radius, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Marker().

◆ markerSlash()

void PLOTTER::markerSlash ( const VECTOR2I & pos,
int radius )
protectedinherited

Plot a / bar centered on the position.

Building block for markers

Definition at line 343 of file plotter.cpp.

References FinishTo(), MoveTo(), radius, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Marker().

◆ markerSquare()

void PLOTTER::markerSquare ( const VECTOR2I & position,
int radius )
protectedinherited

Plot a square centered on the position.

Building block for markers

Definition at line 275 of file plotter.cpp.

References GetCurrentLineWidth(), KiROUND(), NO_FILL, PlotPoly(), radius, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Marker().

◆ markerVBar()

void PLOTTER::markerVBar ( const VECTOR2I & pos,
int radius )
protectedinherited

Plot a | bar centered on the position.

Building block for markers

Definition at line 357 of file plotter.cpp.

References FinishTo(), MoveTo(), radius, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Marker().

◆ MoveTo()

◆ OpenFile()

bool PDF_PLOTTER::OpenFile ( const wxString & aFullFilename)
overridevirtual

Open or create the plot file aFullFilename.

The base class open the file in text mode, so we should have this function overlaid for PDF files, which are binary files.

Parameters
aFullFilenameis the full file name of the file to create.
Returns
true if success, false if the file cannot be created/opened.

Reimplemented from PLOTTER.

Definition at line 155 of file PDF_plotter.cpp.

References PLOTTER::m_filename, and PLOTTER::m_outputFile.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and SCH_PLOTTER::createPDFFile().

◆ PageSettings()

PAGE_INFO & PLOTTER::PageSettings ( )
inlineinherited

Definition at line 155 of file plotter.h.

References m_pageInfo.

◆ PenFinish()

void PLOTTER::PenFinish ( )
inlineinherited

◆ PenTo()

void PDF_PLOTTER::PenTo ( const VECTOR2I & pos,
char plume )
overridevirtual

Moveto/lineto primitive, moves the 'pen' to the specified direction.

Parameters
posis the target position.
plumespecifies the kind of motion: 'U' only moves the pen, 'D' draw a line from the current position and 'Z' finish the drawing and returns the 'pen' to rest (flushes the trace).

Implements PLOTTER.

Definition at line 496 of file PDF_plotter.cpp.

References PLOTTER::m_penLastpos, PLOTTER::m_penState, m_workFile, PLOTTER::userToDeviceCoordinates(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ Plot3DModel()

void PDF_PLOTTER::Plot3DModel ( const wxString & aSourcePath,
const std::vector< PDF_3D_VIEW > & a3DViews )

◆ PlotImage()

void PDF_PLOTTER::PlotImage ( const wxImage & aImage,
const VECTOR2I & aPos,
double aScaleFactor )
overridevirtual

PDF images are handles as inline, not XObject streams...

Reimplemented from PLOTTER.

Definition at line 527 of file PDF_plotter.cpp.

References allocPdfObject(), image, m_imageHandles, m_workFile, PLOTTER::userToDeviceCoordinates(), PLOTTER::userToDeviceSize(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ PlotPoly() [1/2]

void PDF_PLOTTER::PlotPoly ( const SHAPE_LINE_CHAIN & aCornerList,
FILL_T aFill,
int aWidth = USE_DEFAULT_LINE_WIDTH,
void * aData = nullptr )
overridevirtual

Draw a polygon ( filled or not ).

Parameters
aCornerListis the corners list (a SHAPE_LINE_CHAIN). must be closed (IsClosed() == true) for a polygon. Otherwise this is a polyline.
aFillis the type of fill.
aWidthis the line width.
aDatais an auxiliary info (mainly for gerber format).

Reimplemented from PLOTTER.

Definition at line 480 of file PDF_plotter.cpp.

References SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::IsClosed(), PlotPoly(), and SHAPE_LINE_CHAIN::PointCount().

◆ PlotPoly() [2/2]

void PDF_PLOTTER::PlotPoly ( const std::vector< VECTOR2I > & aCornerList,
FILL_T aFill,
int aWidth = USE_DEFAULT_LINE_WIDTH,
void * aData = nullptr )
overridevirtual

Polygon plotting for PDF.

Everything is supported

Implements PLOTTER.

Definition at line 448 of file PDF_plotter.cpp.

References m_workFile, NO_FILL, SetCurrentLineWidth(), PLOTTER::userToDeviceCoordinates(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PlotPoly(), and Rect().

◆ PlotText()

◆ polyArc()

void PLOTTER::polyArc ( const VECTOR2D & aCentre,
const EDA_ANGLE & aStartAngle,
const EDA_ANGLE & aAngle,
double aRadius,
FILL_T aFill,
int aWidth )
protectedvirtualinherited

Generic fallback: arc rendered as a polyline.

Note also aCentre and aRadius are double to avoid creating rounding issues due to the fact a arc is defined in Kicad by a start point, a end point and third point not angles and radius. In some plotters (i.e. dxf) whe need a good precision when calculating an arc without error introduced by rounding, to avoid moving the end points, usually important in outlines when plotting an arc given by center, radius and angles. Winding direction: counter-clockwise in right-down coordinate system.

Definition at line 182 of file plotter.cpp.

References ANGLE_0, EDA_ANGLE::Cos(), DEGREES_T, delta, end, FinishTo(), KiROUND(), LineTo(), MoveTo(), NO_FILL, SetCurrentLineWidth(), sign(), EDA_ANGLE::Sin(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by GERBER_PLOTTER::Arc(), and Arc().

◆ Rect()

void PDF_PLOTTER::Rect ( const VECTOR2I & p1,
const VECTOR2I & p2,
FILL_T fill,
int width,
int aCornerRadius = 0 )
overridevirtual

◆ renderMarkupNode()

VECTOR2I PDF_PLOTTER::renderMarkupNode ( const MARKUP::NODE * aNode,
const VECTOR2I & aPosition,
const VECTOR2I & aBaseSize,
const EDA_ANGLE & aOrient,
bool aTextMirrored,
int aWidth,
bool aBaseBold,
bool aBaseItalic,
KIFONT::FONT * aFont,
const KIFONT::METRICS & aFontMetrics,
enum GR_TEXT_V_ALIGN_T aV_justify,
TEXT_STYLE_FLAGS aTextStyle,
std::vector< OverbarInfo > & aOverbars )
private

◆ RenderSettings()

◆ renderWord()

◆ returnPostscriptTextWidth()

int PSLIKE_PLOTTER::returnPostscriptTextWidth ( const wxString & aText,
int aXSize,
bool aItalic,
bool aBold )
protectedinherited

Sister function for the GRTextWidth in gr_text.cpp Does the same processing (i.e.

calculates a text string width) but using postscript metrics for the Helvetica font (optionally used for PS and PDF plotting

Definition at line 267 of file PS_plotter.cpp.

References hv_widths, hvb_widths, hvbo_widths, hvo_widths, KiROUND(), and postscriptTextAscent.

Referenced by computeTextParameters().

◆ Set3DExport()

void PDF_PLOTTER::Set3DExport ( bool aYes)
inline

Definition at line 439 of file plotters_pslike.h.

References m_3dExportMode.

◆ SetAuthor()

virtual void PLOTTER::SetAuthor ( const wxString & aAuthor)
inlinevirtualinherited

Definition at line 175 of file plotter.h.

References m_author.

Referenced by SCH_PLOTTER::createPDFFile(), and PCB_PLOTTER::Plot().

◆ SetColor()

void PSLIKE_PLOTTER::SetColor ( const COLOR4D & color)
overridevirtualinherited

The SetColor implementation is split with the subclasses: the PSLIKE computes the rgb values, the subclass emits the operator to actually do it.

Implements PLOTTER.

Definition at line 65 of file PS_plotter.cpp.

References color, emitSetRGBColor(), PLOTTER::m_colorMode, PLOTTER::m_negativeMode, and COLOR4D::WHITE.

Referenced by SCH_PLOTTER::plotOneSheetPS(), SCH_PLOTTER::plotOneSheetSVG(), PS_PLOTTER::PlotText(), PDF_PLOTTER::Text(), PS_PLOTTER::Text(), and SVG_PLOTTER::Text().

◆ SetColorMode()

virtual void PLOTTER::SetColorMode ( bool aColorMode)
inlinevirtualinherited

Plot in B/W or color.

Parameters
aColorModeuse true to plot in color, false to plot in black and white.

Definition at line 148 of file plotter.h.

References m_colorMode.

Referenced by SCH_PLOTTER::createPDFFile(), EESCHEMA_JOBS_HANDLER::doSymExportSvg(), GENDRILL_WRITER_BASE::genDrillMapFile(), initializePlotter(), SCH_PLOTTER::plotOneSheetDXF(), SCH_PLOTTER::plotOneSheetPS(), SCH_PLOTTER::plotOneSheetSVG(), and SYMBOL_EDIT_FRAME::SVGPlotSymbol().

◆ SetCreator()

◆ SetCurrentLineWidth()

void PDF_PLOTTER::SetCurrentLineWidth ( int width,
void * aData = nullptr )
overridevirtual

Pen width setting for PDF.

Since the specs explicitly says that a 0 width is a bad thing to use (since it results in 1 pixel traces), we convert such requests to the minimal width (like 1) Note pen width = 0 is used in plot polygons to plot filled polygons with no outline thickness. Use in this case pen width = 1 does not actually change the polygon.

Implements PLOTTER.

Definition at line 187 of file PDF_plotter.cpp.

References PLOTTER::DO_NOT_SET_LINE_WIDTH, PLOTTER::m_currentPenWidth, PLOTTER::m_renderSettings, m_workFile, PLOTTER::USE_DEFAULT_LINE_WIDTH, and PLOTTER::userToDeviceSize().

Referenced by Arc(), Circle(), PlotPoly(), Rect(), and Text().

◆ SetDash()

void PDF_PLOTTER::SetDash ( int aLineWidth,
LINE_STYLE aLineStyle )
overridevirtual

PDF supports dashed lines.

Implements PLOTTER.

Definition at line 225 of file PDF_plotter.cpp.

References DASH, DASHDOT, DASHDOTDOT, DOT, PLOTTER::GetDashGapLenIU(), PLOTTER::GetDashMarkLenIU(), PLOTTER::GetDotMarkLenIU(), and m_workFile.

◆ SetGerberCoordinatesFormat()

virtual void PLOTTER::SetGerberCoordinatesFormat ( int aResolution,
bool aUseInches = false )
inlinevirtualinherited

Reimplemented in GERBER_PLOTTER.

Definition at line 527 of file plotter.h.

Referenced by GENDRILL_WRITER_BASE::genDrillMapFile(), and initializePlotter().

◆ SetLayerPolarity()

virtual void PLOTTER::SetLayerPolarity ( bool aPositive)
inlinevirtualinherited

Set the current Gerber layer polarity to positive or negative by writing %LPD*% or %LPC*% to the Gerber file, respectively.

(obviously starts a new Gerber layer, too)

Parameters
aPositiveis the layer polarity and true for positive. It's not useful with most other plotter since they can't 'scratch' the film like photoplotter imagers do

Reimplemented in GERBER_PLOTTER.

Definition at line 512 of file plotter.h.

Referenced by PlotOneBoardLayer().

◆ SetNegative()

virtual void PLOTTER::SetNegative ( bool aNegative)
inlinevirtualinherited

Definition at line 141 of file plotter.h.

References m_negativeMode.

Referenced by FillNegativeKnockout().

◆ SetPageSettings()

◆ SetPlotMirrored()

void PLOTTER::SetPlotMirrored ( bool aMirror)
inlineinherited

Definition at line 157 of file plotter.h.

References m_plotMirror.

◆ SetRenderSettings()

◆ SetScaleAdjust()

void PSLIKE_PLOTTER::SetScaleAdjust ( double scaleX,
double scaleY )
inlineinherited

Set the 'fine' scaling for the postscript engine.

Definition at line 63 of file plotters_pslike.h.

References plotScaleAdjX, and plotScaleAdjY.

Referenced by StartPlotBoard().

◆ SetSubject()

virtual void PLOTTER::SetSubject ( const wxString & aSubject)
inlinevirtualinherited

Definition at line 176 of file plotter.h.

References m_subject.

Referenced by SCH_PLOTTER::createPDFFile(), and PCB_PLOTTER::Plot().

◆ SetSvgCoordinatesFormat()

virtual void PLOTTER::SetSvgCoordinatesFormat ( unsigned aPrecision)
inlinevirtualinherited

Set the number of digits for mantissa in coordinates in mm for SVG plotter.

Reimplemented in SVG_PLOTTER.

Definition at line 533 of file plotter.h.

Referenced by initializePlotter().

◆ SetTextMode()

virtual void PSLIKE_PLOTTER::SetTextMode ( PLOT_TEXT_MODE mode)
inlineoverridevirtualinherited

PS and PDF fully implement native text (for the Latin-1 subset)

Reimplemented from PLOTTER.

Definition at line 54 of file plotters_pslike.h.

References DEFAULT, and m_textMode.

Referenced by SVG_PLOTTER::SVG_PLOTTER().

◆ SetTitle()

virtual void PLOTTER::SetTitle ( const wxString & aTitle)
inlinevirtualinherited

Definition at line 174 of file plotter.h.

References m_title.

Referenced by SCH_PLOTTER::createPDFFile(), and PCB_PLOTTER::Plot().

◆ SetViewport()

void PDF_PLOTTER::SetViewport ( const VECTOR2I & aOffset,
double aIusPerDecimil,
double aScale,
bool aMirror )
overridevirtual

PDF can have multiple pages, so SetPageSettings can be called with the outputFile open (but not inside a page stream!)

Implements PLOTTER.

Definition at line 171 of file PDF_plotter.cpp.

References PLOTTER::m_iuPerDeviceUnit, PLOTTER::m_IUsPerDecimil, PLOTTER::m_plotMirror, PLOTTER::m_plotOffset, and PLOTTER::m_plotScale.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ StartBlock()

virtual void PLOTTER::StartBlock ( void * aData)
inlinevirtualinherited

calling this function allows one to define the beginning of a group of drawing items, for instance in SVG or Gerber format.

(example: group all segments of a letter or a text)

Parameters
aDatacan define any parameter for most of plotters: do nothing

Reimplemented in GERBER_PLOTTER, and SVG_PLOTTER.

Definition at line 545 of file plotter.h.

Referenced by SCH_SYMBOL::Plot(), and PlotStandardLayer().

◆ StartPage()

void PDF_PLOTTER::StartPage ( const wxString & aPageNumber,
const wxString & aPageName = wxEmptyString,
const wxString & aParentPageNumber = wxEmptyString,
const wxString & aParentPageName = wxEmptyString )
virtual

◆ startPdfObject()

int PDF_PLOTTER::startPdfObject ( int aHandle = -1)
protected

Open a new PDF object and returns the handle if the parameter is -1.

Otherwise fill in the xref entry for the passed object

Definition at line 615 of file PDF_plotter.cpp.

References allocPdfObject(), PLOTTER::m_outputFile, m_workFile, and m_xrefTable.

Referenced by ClosePage(), closePdfStream(), emitGoToAction(), emitGoToAction(), emitOutline(), emitOutlineFonts(), emitOutlineNode(), emitStrokeFonts(), EndPlot(), endPlotEmitResources(), Plot3DModel(), and startPdfStream().

◆ startPdfStream()

int PDF_PLOTTER::startPdfStream ( int aHandle = -1)
protected

Start a PDF stream (for the page).

Parameters
handle-1 (default) for a new object. Especially from PDF 1.5 streams can contain a lot of things, but for the moment we only handle page content. @eturn The object handle opened

Definition at line 637 of file PDF_plotter.cpp.

References allocPdfObject(), ADVANCED_CFG::GetCfg(), PLOTTER::m_outputFile, m_streamLengthHandle, m_workFile, m_workFilename, and startPdfObject().

Referenced by emitOutlineFonts(), emitStrokeFonts(), and StartPage().

◆ StartPlot() [1/2]

bool PDF_PLOTTER::StartPlot ( const wxString & aPageNumber)
overridevirtual

The PDF engine supports multiple pages; the first one is opened 'for free' the following are to be closed and reopened.

Between each page parameters can be set.

Implements PLOTTER.

Definition at line 1079 of file PDF_plotter.cpp.

References StartPlot().

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), SCH_PLOTTER::createPDFFile(), and StartPlot().

◆ StartPlot() [2/2]

◆ Text()

void PDF_PLOTTER::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 )
overridevirtual

Draw text with the plotter.

For convenience it accept the color to use for specific plotters aData is used to pass extra parameters (GERBER).

Parameters
aPosis the text position (according to aH_justify, aV_justify).
aColoris the text color.
aTextis the text to draw.
aOrientis the angle.
aSizeis the text size (size.x or size.y can be < 0 for mirrored texts).
aH_justifyis the horizontal justification (Left, center, right).
aV_justifyis the vertical justification (bottom, center, top).
aPenWidthis the line width (if = 0, use plot default line width).
aItalicis the true to simulate an italic font.
aBolduse true to use a bold font Useful only with default width value (aPenWidth = 0).
aMultilineAlloweduse true to plot text as multiline, otherwise single line.
aDatais a parameter used by some plotters in SetCurrentLineWidth(), not directly used here.

Reimplemented from PLOTTER.

Definition at line 1932 of file PDF_plotter.cpp.

References std::abs(), drawOverbars(), EXPRESSION_EVALUATOR::Evaluate(), KIFONT::FONT::GetFont(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, PLOTTER::m_renderSettings, MARKUP::MARKUP_PARSER::Parse(), renderMarkupNode(), renderWord(), RotatePoint(), PSLIKE_PLOTTER::SetColor(), SetCurrentLineWidth(), KIFONT::FONT::StringBoundaryLimits(), UTF8::substr(), text, tracePdfPlotter, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PlotText().

◆ ThickArc() [1/2]

void PLOTTER::ThickArc ( const EDA_SHAPE & aArcShape,
void * aData,
int aWidth )
virtualinherited

◆ ThickArc() [2/2]

void PLOTTER::ThickArc ( const VECTOR2D & aCentre,
const EDA_ANGLE & aStAngle,
const EDA_ANGLE & aAngle,
double aRadius,
int aWidth,
void * aData )
virtualinherited

Reimplemented in DXF_PLOTTER, and GERBER_PLOTTER.

Definition at line 554 of file plotter.cpp.

References Arc(), and NO_FILL.

◆ ThickCircle()

void PLOTTER::ThickCircle ( const VECTOR2I & pos,
int diametre,
int width,
void * aData )
virtualinherited

Reimplemented in DXF_PLOTTER, and GERBER_PLOTTER.

Definition at line 592 of file plotter.cpp.

References Circle(), and NO_FILL.

Referenced by SCH_LABEL_BASE::Plot(), PlotLayerOutlines(), and GERBER_PLOTTER::ThickCircle().

◆ ThickOval()

void PLOTTER::ThickOval ( const VECTOR2I & aPos,
const VECTOR2I & aSize,
const EDA_ANGLE & aOrient,
int aWidth,
void * aData )
virtualinherited

◆ ThickPoly()

void PLOTTER::ThickPoly ( const SHAPE_POLY_SET & aPoly,
int aWidth,
void * aData )
virtualinherited

Reimplemented in DXF_PLOTTER, and GERBER_PLOTTER.

Definition at line 604 of file plotter.cpp.

References SHAPE_POLY_SET::COutline(), NO_FILL, and PlotPoly().

Referenced by GERBER_PLOTTER::ThickPoly().

◆ ThickRect()

void PLOTTER::ThickRect ( const VECTOR2I & p1,
const VECTOR2I & p2,
int width,
void * aData )
virtualinherited

Reimplemented in DXF_PLOTTER, and GERBER_PLOTTER.

Definition at line 586 of file plotter.cpp.

References NO_FILL, and Rect().

Referenced by GERBER_PLOTTER::ThickRect().

◆ ThickSegment()

void PLOTTER::ThickSegment ( const VECTOR2I & start,
const VECTOR2I & end,
int width,
void * aData )
virtualinherited

◆ userToDeviceCoordinates()

◆ userToDeviceSize() [1/2]

◆ userToDeviceSize() [2/2]

double PLOTTER::userToDeviceSize ( double size) const
protectedvirtualinherited

Modify size according to the plotter scale factors (simple double version).

Definition at line 124 of file plotter.cpp.

References m_iuPerDeviceUnit, and m_plotScale.

Member Data Documentation

◆ DO_NOT_SET_LINE_WIDTH

◆ m_3dExportMode

bool PDF_PLOTTER::m_3dExportMode
protected

Definition at line 617 of file plotters_pslike.h.

Referenced by ClosePage(), EndPlot(), PDF_PLOTTER(), Set3DExport(), and StartPage().

◆ m_3dModelHandle

int PDF_PLOTTER::m_3dModelHandle
protected

Definition at line 616 of file plotters_pslike.h.

Referenced by ClosePage(), PDF_PLOTTER(), and Plot3DModel().

◆ m_author

wxString PLOTTER::m_author
protectedinherited

Definition at line 673 of file plotter.h.

Referenced by PDF_PLOTTER::EndPlot(), and SetAuthor().

◆ m_bookmarksInPage

std::map<wxString, std::vector<std::pair<BOX2I, wxString> > > PDF_PLOTTER::m_bookmarksInPage
protected

Definition at line 609 of file plotters_pslike.h.

Referenced by Bookmark(), ClosePage(), and StartPlot().

◆ m_colorMode

◆ m_creator

wxString PLOTTER::m_creator
protectedinherited

◆ m_currentPenWidth

◆ m_filename

wxString PLOTTER::m_filename
protectedinherited

◆ m_fontResDictHandle

int PDF_PLOTTER::m_fontResDictHandle
protected

Font resource dictionary.

Definition at line 584 of file plotters_pslike.h.

Referenced by ClosePage(), endPlotEmitResources(), PDF_PLOTTER(), and StartPlot().

◆ m_headerExtraLines

wxArrayString PLOTTER::m_headerExtraLines
protectedinherited

Definition at line 678 of file plotter.h.

Referenced by AddLineToHeader(), ClearHeaderLinesList(), and GERBER_PLOTTER::StartPlot().

◆ m_hyperlinkHandles

std::map<int, std::pair<BOX2D, wxString> > PDF_PLOTTER::m_hyperlinkHandles
protected

Handles for all the hyperlink objects that will be deferred.

Definition at line 606 of file plotters_pslike.h.

Referenced by ClosePage(), endPlotEmitResources(), and StartPlot().

◆ m_hyperlinkMenuHandles

std::map<int, std::pair<BOX2D, std::vector<wxString> > > PDF_PLOTTER::m_hyperlinkMenuHandles
protected

Definition at line 607 of file plotters_pslike.h.

Referenced by ClosePage(), endPlotEmitResources(), and StartPlot().

◆ m_hyperlinkMenusInPage

std::vector<std::pair<BOX2I, std::vector<wxString> > > PDF_PLOTTER::m_hyperlinkMenusInPage
protected

Definition at line 603 of file plotters_pslike.h.

Referenced by ClosePage(), HyperlinkMenu(), and StartPlot().

◆ m_hyperlinksInPage

std::vector<std::pair<BOX2I, wxString> > PDF_PLOTTER::m_hyperlinksInPage
protected

List of loaded hyperlinks in current page.

Definition at line 602 of file plotters_pslike.h.

Referenced by ClosePage(), HyperlinkBox(), and StartPlot().

◆ m_imageHandles

std::map<int, wxImage> PDF_PLOTTER::m_imageHandles
protected

Definition at line 611 of file plotters_pslike.h.

Referenced by endPlotEmitResources(), and PlotImage().

◆ m_imgResDictHandle

int PDF_PLOTTER::m_imgResDictHandle
protected

Image resource dictionary.

Definition at line 585 of file plotters_pslike.h.

Referenced by ClosePage(), endPlotEmitResources(), PDF_PLOTTER(), and StartPlot().

◆ m_iuPerDeviceUnit

◆ m_IUsPerDecimil

◆ m_jsNamesHandle

int PDF_PLOTTER::m_jsNamesHandle
protected

Handle for Names dictionary with JS.

Definition at line 586 of file plotters_pslike.h.

Referenced by EndPlot(), endPlotEmitResources(), PDF_PLOTTER(), and StartPlot().

◆ m_mirrorIsHorizontal

bool PLOTTER::m_mirrorIsHorizontal
protectedinherited

◆ m_negativeMode

bool PLOTTER::m_negativeMode
protectedinherited

Definition at line 665 of file plotter.h.

Referenced by PLOTTER(), PSLIKE_PLOTTER::SetColor(), and SetNegative().

◆ m_outlineFontManager

std::unique_ptr<PDF_OUTLINE_FONT_MANAGER> PDF_PLOTTER::m_outlineFontManager
protected

◆ m_outlineRoot

std::unique_ptr<OUTLINE_NODE> PDF_PLOTTER::m_outlineRoot
protected

Root outline node.

Definition at line 613 of file plotters_pslike.h.

Referenced by ClosePage(), emitOutline(), and StartPlot().

◆ m_outputFile

FILE* PLOTTER::m_outputFile
protectedinherited

Output file.

Definition at line 661 of file plotter.h.

Referenced by DXF_PLOTTER::Arc(), PS_PLOTTER::Arc(), SVG_PLOTTER::Arc(), SVG_PLOTTER::BezierCurve(), DXF_PLOTTER::Circle(), PS_PLOTTER::Circle(), SVG_PLOTTER::Circle(), GERBER_PLOTTER::ClearAllAttributes(), GERBER_PLOTTER::clearNetAttribute(), PDF_PLOTTER::ClosePage(), PDF_PLOTTER::closePdfObject(), PDF_PLOTTER::closePdfStream(), GERBER_PLOTTER::emitDcode(), PDF_PLOTTER::emitGoToAction(), PDF_PLOTTER::emitGoToAction(), PDF_PLOTTER::emitOutline(), PDF_PLOTTER::emitOutlineFonts(), PDF_PLOTTER::emitOutlineNode(), PS_PLOTTER::emitSetRGBColor(), PDF_PLOTTER::emitStrokeFonts(), DXF_PLOTTER::EndPlot(), GERBER_PLOTTER::EndPlot(), PDF_PLOTTER::EndPlot(), PS_PLOTTER::EndPlot(), SVG_PLOTTER::EndPlot(), PDF_PLOTTER::endPlotEmitResources(), DXF_PLOTTER::FlashPadCircle(), DXF_PLOTTER::FlashPadOval(), GERBER_PLOTTER::FlashPadOval(), PSLIKE_PLOTTER::FlashPadOval(), DXF_PLOTTER::FlashPadRect(), GERBER_PLOTTER::FlashPadRect(), GERBER_PLOTTER::FlashPadRoundRect(), DXF_PLOTTER::FlashPadTrapez(), GERBER_PLOTTER::formatNetAttribute(), PDF_PLOTTER::OpenFile(), OpenFile(), DXF_PLOTTER::PenTo(), GERBER_PLOTTER::PenTo(), PS_PLOTTER::PenTo(), SVG_PLOTTER::PenTo(), PDF_PLOTTER::Plot3DModel(), GERBER_PLOTTER::plotArc(), GERBER_PLOTTER::plotArc(), GERBER_PLOTTER::PlotGerberRegion(), GERBER_PLOTTER::PlotGerberRegion(), PS_PLOTTER::PlotImage(), SVG_PLOTTER::PlotImage(), DXF_PLOTTER::plotOneLineOfText(), GERBER_PLOTTER::PlotPoly(), GERBER_PLOTTER::PlotPoly(), PS_PLOTTER::PlotPoly(), SVG_PLOTTER::PlotPoly(), GERBER_PLOTTER::plotRoundRectAsRegion(), PLOTTER(), PS_PLOTTER::PlotText(), DXF_PLOTTER::Rect(), PS_PLOTTER::Rect(), SVG_PLOTTER::Rect(), GERBER_PLOTTER::selectAperture(), GERBER_PLOTTER::selectAperture(), PS_PLOTTER::SetCurrentLineWidth(), PS_PLOTTER::SetDash(), GERBER_PLOTTER::SetLayerPolarity(), SVG_PLOTTER::setSVGPlotStyle(), PS_PLOTTER::SetViewport(), PDF_PLOTTER::StartPage(), PDF_PLOTTER::startPdfObject(), PDF_PLOTTER::startPdfStream(), DXF_PLOTTER::StartPlot(), GERBER_PLOTTER::StartPlot(), PDF_PLOTTER::StartPlot(), PS_PLOTTER::StartPlot(), SVG_PLOTTER::StartPlot(), PS_PLOTTER::Text(), SVG_PLOTTER::Text(), GERBER_PLOTTER::writeApertureList(), and ~PLOTTER().

◆ m_pageHandles

std::vector<int> PDF_PLOTTER::m_pageHandles
protected

Handles to the page objects.

Definition at line 587 of file plotters_pslike.h.

Referenced by ClosePage(), EndPlot(), and endPlotEmitResources().

◆ m_pageInfo

◆ m_pageName

wxString PDF_PLOTTER::m_pageName
protected

Definition at line 592 of file plotters_pslike.h.

Referenced by ClosePage(), and StartPage().

◆ m_pageNumbers

std::vector<wxString> PDF_PLOTTER::m_pageNumbers
protected

List of user-space page numbers for resolving internal hyperlinks.

Definition at line 599 of file plotters_pslike.h.

Referenced by endPlotEmitResources(), and StartPage().

◆ m_pageStreamHandle

int PDF_PLOTTER::m_pageStreamHandle
protected

Handle of the page content object.

Definition at line 588 of file plotters_pslike.h.

Referenced by ClosePage(), PDF_PLOTTER(), and StartPage().

◆ m_pageTreeHandle

int PDF_PLOTTER::m_pageTreeHandle
protected

Handle to the root of the page tree object.

Definition at line 583 of file plotters_pslike.h.

Referenced by ClosePage(), EndPlot(), PDF_PLOTTER(), and StartPlot().

◆ m_paperSize

◆ m_parentPageName

wxString PDF_PLOTTER::m_parentPageName
protected

Definition at line 593 of file plotters_pslike.h.

Referenced by ClosePage(), and StartPage().

◆ m_penLastpos

VECTOR2I PLOTTER::m_penLastpos
protectedinherited

◆ m_penState

char PLOTTER::m_penState
protectedinherited

◆ m_plotMirror

◆ m_plotOffset

◆ m_plotScale

double PLOTTER::m_plotScale
protectedinherited

◆ m_project

const PROJECT* PLOTTER::m_project
protectedinherited

Definition at line 682 of file plotter.h.

Referenced by PDF_PLOTTER::endPlotEmitResources(), and PLOTTER().

◆ m_renderSettings

◆ m_streamLengthHandle

int PDF_PLOTTER::m_streamLengthHandle
protected

Handle to the deferred stream length.

Definition at line 589 of file plotters_pslike.h.

Referenced by closePdfStream(), PDF_PLOTTER(), and startPdfStream().

◆ m_strokeFontManager

std::unique_ptr<PDF_STROKE_FONT_MANAGER> PDF_PLOTTER::m_strokeFontManager
protected

◆ m_subject

wxString PLOTTER::m_subject
protectedinherited

Definition at line 674 of file plotter.h.

Referenced by PDF_PLOTTER::EndPlot(), and SetSubject().

◆ m_textMode

PLOT_TEXT_MODE PSLIKE_PLOTTER::m_textMode
protectedinherited

How to draw text.

Definition at line 140 of file plotters_pslike.h.

Referenced by PS_PLOTTER::PlotText(), PS_PLOTTER::PS_PLOTTER(), PSLIKE_PLOTTER(), SetTextMode(), and PS_PLOTTER::Text().

◆ m_title

wxString PLOTTER::m_title
protectedinherited

Definition at line 672 of file plotter.h.

Referenced by PDF_PLOTTER::EndPlot(), SetTitle(), and PS_PLOTTER::StartPlot().

◆ m_totalOutlineNodes

int PDF_PLOTTER::m_totalOutlineNodes
protected

Total number of outline nodes.

Definition at line 614 of file plotters_pslike.h.

Referenced by addOutlineNode(), emitOutline(), PDF_PLOTTER(), and StartPlot().

◆ m_workFile

FILE* PDF_PLOTTER::m_workFile
protected

◆ m_workFilename

wxString PDF_PLOTTER::m_workFilename
protected

Definition at line 591 of file plotters_pslike.h.

Referenced by closePdfStream(), and startPdfStream().

◆ m_xrefTable

std::vector<long> PDF_PLOTTER::m_xrefTable
protected

The PDF xref offset table.

Definition at line 596 of file plotters_pslike.h.

Referenced by allocPdfObject(), EndPlot(), startPdfObject(), and StartPlot().

◆ m_yaxisReversed

bool PLOTTER::m_yaxisReversed
protectedinherited

Definition at line 658 of file plotter.h.

Referenced by PLOTTER(), SVG_PLOTTER::SetViewport(), and userToDeviceCoordinates().

◆ MARKER_COUNT

const unsigned PLOTTER::MARKER_COUNT = 58
staticinherited

Draw a marker (used for the drill map).

Definition at line 492 of file plotter.h.

Referenced by Marker().

◆ plotScaleAdjX

double PSLIKE_PLOTTER::plotScaleAdjX
protectedinherited

Fine user scale adjust ( = 1.0 if no correction)

Definition at line 137 of file plotters_pslike.h.

Referenced by PSLIKE_PLOTTER(), SetScaleAdjust(), PDF_PLOTTER::StartPage(), and PS_PLOTTER::StartPlot().

◆ plotScaleAdjY

double PSLIKE_PLOTTER::plotScaleAdjY
protectedinherited

◆ postscriptTextAscent

const double PSLIKE_PLOTTER::postscriptTextAscent = 0.718
staticprotectedinherited

Height of the postscript font (from the AFM)

Definition at line 127 of file plotters_pslike.h.

Referenced by computeTextParameters(), and returnPostscriptTextWidth().

◆ USE_DEFAULT_LINE_WIDTH


The documentation for this class was generated from the following files: