40 return PLOT_FORMAT::HPGL;
45 return wxString( wxT(
"plt" ) );
64 virtual bool StartPlot(
const wxString& aPageNumber )
override;
69 virtual bool EndPlot()
override;
101 double aScale,
bool aMirror )
override;
106 virtual void PlotPoly(
const std::vector<VECTOR2I>& aCornerList,
FILL_T aFill,
112 virtual void PenTo(
const VECTOR2I& pos,
char plume )
override;
118 void* aData )
override;
121 void* aData )
override;
123 int aCornerRadius,
const EDA_ANGLE& aOrient,
130 void* aData )
override;
133 void* aData )
override;
212 static void sortItems( std::list<HPGL_ITEM>& items );
virtual void FlashPadRoundRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, int aCornerRadius, const EDA_ANGLE &aOrient, OUTLINE_MODE aTraceMode, void *aData) override
void SetUserCoordsFit(bool user_coords_fit)
Set whether the user coordinate system is fit to content.
HPGL_ITEM * m_current_item
virtual void SetDash(int aLineWidth, LINE_STYLE aLineStyle) override
HPGL supports dashed lines.
virtual void SetPenSpeed(int speed)
bool startItem(const VECTOR2D &location)
Start a new HPGL_ITEM if necessary, keeping the current one if it exists.
double m_arcTargetChordLength
void flushItem()
Flush the current HPGL_ITEM and clear out the current item pointer.
virtual void FlashPadTrapez(const VECTOR2I &aPadPos, const VECTOR2I *aCorners, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData) override
Flash a trapezoidal pad.
virtual PLOT_FORMAT GetPlotterType() const override
Returns the effective plot engine in use.
void SetTargetChordLength(double chord_len)
Set the target length of chords used to draw approximated circles and arcs.
virtual void SetPenNumber(int number)
static wxString GetDefaultFileExtension()
void SetUserCoords(bool user_coords)
Switch to the user coordinate system.
static void sortItems(std::list< HPGL_ITEM > &items)
Sort a list of HPGL items to improve plotting speed on mechanical plotters.
virtual void FlashPadCircle(const VECTOR2I &aPadPos, int aDiameter, OUTLINE_MODE aTraceMode, void *aData) override
virtual bool StartPlot(const wxString &aPageNumber) override
At the start of the HPGL plot pen speed and number are requested.
EDA_ANGLE m_arcMinChordDegrees
virtual void SetColor(const COLOR4D &color) override
virtual void SetCurrentLineWidth(int width, void *aData=nullptr) override
HPGL doesn't handle line thickness or color.
virtual void FlashRegularPolygon(const VECTOR2I &aShapePos, int aDiameter, int aCornerCount, const EDA_ANGLE &aOrient, OUTLINE_MODE aTraceMode, void *aData) override
Flash a regular polygon.
virtual void PlotPoly(const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr) override
Draw a polygon ( filled or not ).
static const char * lineStyleCommand(LINE_STYLE aLineStyle)
Return the plot command corresponding to a line type.
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH) override
virtual void SetViewport(const VECTOR2I &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
std::list< HPGL_ITEM > m_items
virtual void FlashPadCustom(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, SHAPE_POLY_SET *aPolygons, OUTLINE_MODE aTraceMode, void *aData) override
virtual void SetPenDiameter(double diameter)
virtual void FlashPadOval(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aPadOrient, OUTLINE_MODE aTraceMode, void *aData) override
virtual void Arc(const VECTOR2D &aCenter, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle, double aRadius, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH) override
Plot an arc.
virtual void PenTo(const VECTOR2I &pos, char plume) override
Moveto/lineto primitive, moves the 'pen' to the specified direction.
virtual void ThickSegment(const VECTOR2I &start, const VECTOR2I &end, int width, OUTLINE_MODE tracemode, void *aData) override
virtual void SetColorMode(bool aColorMode) override
HPGL doesn't handle color.
bool startOrAppendItem(const VECTOR2D &location, const wxString &content)
Start a new HPGL_ITEM with the given string if necessary, or append the string to the current item.
virtual void Circle(const VECTOR2I &aCenter, int aDiameter, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH) override
virtual bool EndPlot() override
HPGL end of plot: sort and emit graphics, pen return and release.
virtual void FlashPadRect(const VECTOR2I &aPadPos, const VECTOR2I &aSize, const EDA_ANGLE &aOrient, OUTLINE_MODE aTraceMode, void *aData) override
A color representation with 4 components: red, green, blue, alpha.
Base plotter engine class.
static const int USE_DEFAULT_LINE_WIDTH
virtual VECTOR2D userToDeviceSize(const VECTOR2I &size)
Modify size according to the plotter scale factors (VECTOR2I version, returns a VECTOR2D).
Represent a set of closed polygons.
PLOT_FORMAT
The set of supported output plot formats.
LINE_STYLE
Dashed line types.
wxString content
Line style for this command.
bool pen_returns
Whether the pen returns to its original state after the command.
BOX2D bbox
Bounding box of this item.
LINE_STYLE dashType
Pen number for this command.
bool lift_after
Whether the pen must be lifted after the command.
bool lift_before
Whether the command should be executed with the pen lifted.
VECTOR2D loc_start
Location the pen should start at.
VECTOR2D loc_end
Location the pen will be at when it finishes.