KiCAD pcbnew scripting
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
pcbnew.PS_PLOTTER Class Reference
Inheritance diagram for pcbnew.PS_PLOTTER:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self)
 
def GetDefaultFileExtension ()
 
def GetPlotterType (self)
 
def StartPlot (self)
 
def EndPlot (self)
 
def SetCurrentLineWidth
 
def SetDash (self, dashed)
 
def SetViewport (self, aOffset, aIusPerDecimil, aScale, aMirror)
 
def Rect (self, args)
 
def Circle (self, args)
 
def Arc (self, args)
 
def PlotPoly (self, args)
 
def PlotImage (self, aImage, aPos, aScaleFactor)
 
def PenTo (self, pos, plume)
 
def Text
 
- Public Member Functions inherited from pcbnew.PSLIKE_PLOTTER
def __init__ (self, args, kwargs)
 
def SetTextMode (self, mode)
 
def SetDefaultLineWidth (self, width)
 
def SetScaleAdjust (self, scaleX, scaleY)
 
def FlashPadCircle (self, aPadPos, aDiameter, aTraceMode, aData)
 
def FlashPadOval (self, aPadPos, aSize, aPadOrient, aTraceMode, aData)
 
def FlashPadRect (self, aPadPos, aSize, aPadOrient, aTraceMode, aData)
 
def FlashPadRoundRect (self, aPadPos, aSize, aCornerRadius, aOrient, aTraceMode, aData)
 
def FlashPadCustom (self, aPadPos, aSize, aPolygons, aTraceMode, aData)
 
def FlashPadTrapez (self, aPadPos, aCorners, aPadOrient, aTraceMode, aData)
 
def SetColor (self, color)
 
- Public Member Functions inherited from pcbnew.PLOTTER
def __init__ (self, args, kwargs)
 
def GetPlotterType (self)
 
def StartPlot (self)
 
def EndPlot (self)
 
def SetNegative (self, _negative)
 
def SetColorMode (self, _color_mode)
 
def GetColorMode (self)
 
def SetPageSettings (self, aPageSettings)
 
def SetCurrentLineWidth
 
def SetDefaultLineWidth (self, width)
 
def GetCurrentLineWidth (self)
 
def SetColor (self, color)
 
def SetDash (self, dashed)
 
def SetCreator (self, aCreator)
 
def SetTitle (self, aTitle)
 
def AddLineToHeader (self, aExtraString)
 
def ClearHeaderLinesList (self)
 
def SetViewport (self, aOffset, aIusPerDecimil, aScale, aMirror)
 
def OpenFile (self, aFullFilename)
 
def GetIUsPerDecimil (self)
 
def Rect (self, args)
 
def Circle (self, args)
 
def Arc (self, args)
 
def PenTo (self, pos, plume)
 
def MoveTo (self, pos)
 
def LineTo (self, pos)
 
def FinishTo (self, pos)
 
def PenFinish (self)
 
def PlotPoly (self, args)
 
def PlotImage (self, aImage, aPos, aScaleFactor)
 
def ThickSegment (self, start, end, width, tracemode, aData)
 
def ThickArc (self, centre, StAngle, EndAngle, rayon, width, tracemode, aData)
 
def ThickRect (self, p1, p2, width, tracemode, aData)
 
def ThickCircle (self, pos, diametre, width, tracemode, aData)
 
def FlashPadCircle (self, aPadPos, aDiameter, aTraceMode, aData)
 
def FlashPadOval (self, aPadPos, aSize, aPadOrient, aTraceMode, aData)
 
def FlashPadRect (self, aPadPos, aSize, aPadOrient, aTraceMode, aData)
 
def FlashPadRoundRect (self, aPadPos, aSize, aCornerRadius, aOrient, aTraceMode, aData)
 
def FlashPadCustom (self, aPadPos, aSize, aPolygons, aTraceMode, aData)
 
def FlashPadTrapez (self, aPadPos, aCorners, aPadOrient, aTraceMode, aData)
 
def Text
 
def Marker (self, position, diametre, aShapeId)
 
def SetLayerPolarity (self, aPositive)
 
def SetTextMode (self, mode)
 
def SetGerberCoordinatesFormat
 
def StartBlock (self, aData)
 
def EndBlock (self, aData)
 

Public Attributes

 this
 

Static Public Attributes

tuple GetDefaultFileExtension = staticmethod(GetDefaultFileExtension)
 
- Static Public Attributes inherited from pcbnew.PLOTTER
 DO_NOT_SET_LINE_WIDTH = _pcbnew.PLOTTER_DO_NOT_SET_LINE_WIDTH
 
 USE_DEFAULT_LINE_WIDTH = _pcbnew.PLOTTER_USE_DEFAULT_LINE_WIDTH
 
 MARKER_COUNT = _pcbnew.PLOTTER_MARKER_COUNT
 

Detailed Description

C++ includes: plot_common.h 

Definition at line 11917 of file pcbnew.py.

Constructor & Destructor Documentation

def pcbnew.PS_PLOTTER.__init__ (   self)
__init__(PS_PLOTTER self) -> PS_PLOTTER

PS_PLOTTER::PS_PLOTTER() 

Definition at line 11929 of file pcbnew.py.

Member Function Documentation

def pcbnew.PS_PLOTTER.Arc (   self,
  args 
)
Arc(PS_PLOTTER self, wxPoint centre, double StAngle, double EndAngle, int rayon, FILL_T fill, int width)
Arc(PS_PLOTTER self, wxPoint centre, double StAngle, double EndAngle, int rayon, FILL_T fill)

void PS_PLOTTER::Arc(const
wxPoint &centre, double StAngle, double EndAngle, int rayon, FILL_T
fill, int width=USE_DEFAULT_LINE_WIDTH) override

Generic fallback: arc rendered as a polyline. 

Definition at line 12078 of file pcbnew.py.

def pcbnew.PS_PLOTTER.Circle (   self,
  args 
)
Circle(PS_PLOTTER self, wxPoint pos, int diametre, FILL_T fill, int width)
Circle(PS_PLOTTER self, wxPoint pos, int diametre, FILL_T fill)

void
PS_PLOTTER::Circle(const wxPoint &pos, int diametre, FILL_T fill, int
width=USE_DEFAULT_LINE_WIDTH) override 

Definition at line 12066 of file pcbnew.py.

def pcbnew.PS_PLOTTER.EndPlot (   self)
EndPlot(PS_PLOTTER self) -> bool

bool
PS_PLOTTER::EndPlot() override 

Definition at line 11986 of file pcbnew.py.

def pcbnew.PS_PLOTTER.GetDefaultFileExtension ( )
GetDefaultFileExtension() -> wxString

Definition at line 11941 of file pcbnew.py.

def pcbnew.PS_PLOTTER.GetPlotterType (   self)
GetPlotterType(PS_PLOTTER self) -> PlotFormat

virtual PlotFormat
PS_PLOTTER::GetPlotterType() const override

Returns 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 

Definition at line 11949 of file pcbnew.py.

def pcbnew.PS_PLOTTER.PenTo (   self,
  pos,
  plume 
)
PenTo(PS_PLOTTER self, wxPoint pos, char plume)

void
PS_PLOTTER::PenTo(const wxPoint &pos, char plume) override

moveto/lineto primitive, moves the 'pen' to the specified direction

Parameters:
-----------

pos:  is the target position

plume:  specifies 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) 

Definition at line 12134 of file pcbnew.py.

def pcbnew.PS_PLOTTER.PlotImage (   self,
  aImage,
  aPos,
  aScaleFactor 
)
PlotImage(PS_PLOTTER self, wxImage const & aImage, wxPoint aPos, double aScaleFactor)

void
PS_PLOTTER::PlotImage(const wxImage &aImage, const wxPoint &aPos,
double aScaleFactor) override

Postscript-likes at the moment are the only plot engines supporting
bitmaps... 

Definition at line 12120 of file pcbnew.py.

def pcbnew.PS_PLOTTER.PlotPoly (   self,
  args 
)
PlotPoly(PS_PLOTTER self, wxPoint_Vector aCornerList, FILL_T aFill, int aWidth, void * aData=None)
PlotPoly(PS_PLOTTER self, wxPoint_Vector aCornerList, FILL_T aFill, int aWidth)
PlotPoly(PS_PLOTTER self, wxPoint_Vector aCornerList, FILL_T aFill)

void
PS_PLOTTER::PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_T
aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL) override

Function PlotPoly.

Draw a polygon ( filled or not )

Parameters:
-----------

aCornerList:  = corners list

aFill:  = type of fill

aWidth:  = line width

aData:  an auxiliary info (mainly for gerber format) 

Definition at line 12092 of file pcbnew.py.

def pcbnew.PS_PLOTTER.Rect (   self,
  args 
)
Rect(PS_PLOTTER self, wxPoint p1, wxPoint p2, FILL_T fill, int width)
Rect(PS_PLOTTER self, wxPoint p1, wxPoint p2, FILL_T fill)

void PS_PLOTTER::Rect(const
wxPoint &p1, const wxPoint &p2, FILL_T fill, int
width=USE_DEFAULT_LINE_WIDTH) override 

Definition at line 12054 of file pcbnew.py.

def pcbnew.PS_PLOTTER.SetCurrentLineWidth (   self,
  width,
  aData = None 
)
SetCurrentLineWidth(PS_PLOTTER self, int width, void * aData=None)
SetCurrentLineWidth(PS_PLOTTER self, int width)

void
PS_PLOTTER::SetCurrentLineWidth(int width, void *aData=NULL) override

Set the line width for the next drawing.

Parameters:
-----------

width:  is specified in IUs

aData:  is an auxiliary parameter, mainly used in gerber plotter 

Definition at line 11996 of file pcbnew.py.

Here is the caller graph for this function:

def pcbnew.PS_PLOTTER.SetDash (   self,
  dashed 
)
SetDash(PS_PLOTTER self, bool dashed)

void
PS_PLOTTER::SetDash(bool dashed) override

Postscript supports dashed lines. 

Definition at line 12016 of file pcbnew.py.

def pcbnew.PS_PLOTTER.SetViewport (   self,
  aOffset,
  aIusPerDecimil,
  aScale,
  aMirror 
)
SetViewport(PS_PLOTTER self, wxPoint aOffset, double aIusPerDecimil, double aScale, bool aMirror)

void
PS_PLOTTER::SetViewport(const wxPoint &aOffset, double aIusPerDecimil,
double aScale, bool aMirror) override

Set the plot offset and scaling for the current plot.

Parameters:
-----------

aOffset:  is the plot offset

aIusPerDecimil:  gives the scaling factor from IUs to device units

aScale:  is the user set plot scaling factor (either explicitly or
using 'fit to A4')

aMirror:  flips the plot in the Y direction (useful for toner
transfers or some kind of film) 

Definition at line 12028 of file pcbnew.py.

def pcbnew.PS_PLOTTER.StartPlot (   self)
StartPlot(PS_PLOTTER self) -> bool

bool
PS_PLOTTER::StartPlot() override

The code within this function (and the CloseFilePS function) creates
postscript files whose contents comply with Adobe's Document
Structuring Convention, as documented by assorted details described
within the following URLs:

http://en.wikipedia.org/wiki/Document_Structuring_Conventionshttp://pa
rtners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf

BBox is the boundary box (position and size of the "client
rectangle" for drawings (page - margins) in mils (0.001 inch) 

Definition at line 11965 of file pcbnew.py.

def pcbnew.PS_PLOTTER.Text (   self,
  aPos,
  aColor,
  aText,
  aOrient,
  aSize,
  aH_justify,
  aV_justify,
  aWidth,
  aItalic,
  aBold,
  aMultilineAllowed = False,
  aData = None 
)
Text(PS_PLOTTER self, wxPoint aPos, COLOR4D aColor, wxString aText, double aOrient, 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=None)
Text(PS_PLOTTER self, wxPoint aPos, COLOR4D aColor, wxString aText, double aOrient, 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)
Text(PS_PLOTTER self, wxPoint aPos, COLOR4D aColor, wxString aText, double aOrient, wxSize aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold)

void PS_PLOTTER::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=NULL) override

Draws text with the plotter.

Function PLOTTER::Text same as DrawGraphicText, but plot graphic text
insteed of draw it.

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

Parameters:
-----------

aPos:  = text position (according to aH_justify, aV_justify)

aColor:  (COLOR4D) = text color

aText:  = text to draw

aOrient:  = angle in 0.1 degree

aSize:  = text size (size.x or size.y can be < 0 for mirrored texts)

aH_justify:  = horizontal justification (Left, center, right)

aV_justify:  = vertical justification (bottom, center, top)

aWidth:  = line width (pen width) (default = 0) if width < 0 : draw
segments in sketch mode, width = abs(width) Use a value min(aSize.x,
aSize.y) / 5 for a bold text

aItalic:  = true to simulate an italic font

aBold:  = true to use a bold font Useful only with default width value
(aWidth = 0)

aMultilineAllowed:  = true to plot text as multiline, otherwise single
line

aData:  = a parameter used by some plotters in SetCurrentLineWidth(),
not directly used here. 

Definition at line 12155 of file pcbnew.py.

Member Data Documentation

tuple pcbnew.PS_PLOTTER.GetDefaultFileExtension = staticmethod(GetDefaultFileExtension)
static

Definition at line 11946 of file pcbnew.py.

pcbnew.PS_PLOTTER.this

Definition at line 11939 of file pcbnew.py.


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