31 #include <wx/filename.h> 58 const PAGE_INFO& aPageInfo,
const wxString& aSheetNumber,
int aSheetCount,
59 const wxString& aSheetDesc,
const wxString& aFilename,
COLOR4D aColor,
68 if( plotColor == COLOR4D::UNSPECIFIED )
75 wxFileName fn( aFilename );
94 switch( item->Type() )
108 int penWidth = std::max( rect->
GetPenWidth(), defaultPenWidth );
127 int penWidth = std::max( poly->
GetPenWidth(), defaultPenWidth );
128 std::vector<wxPoint> points;
135 for(
int ii = 0; ii < outline.
PointCount(); ii++ )
136 points.emplace_back( outline.
CPoint( ii ).
x, outline.
CPoint( ii ).
y );
157 wxFAIL_MSG(
"PlotDrawingSheet(): Unknown drawing sheet item." );
static wxString GetDefaultFileExtension()
void FinishTo(const wxPoint &pos)
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
int OutlineCount() const
Return the number of vertices in a given outline/hole.
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
static wxString GetDefaultFileExtension()
Container for project specific data.
void SetMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to draw/plot units.
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
Plotting engines (PostScript, Gerber, HPGL and DXF)
virtual void SetColor(COLOR4D color)=0
wxPoint GetPosition() const override
virtual void Rect(const wxPoint &p1, const wxPoint &p2, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
void SetDefaultPenSize(int aPenSize)
static wxString GetDefaultFileExtension()
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
double GetTextAngle() const
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL)=0
Draw a polygon ( filled or not )
int PointCount() const
Function PointCount()
Hold the information shown in the lower right corner of a plot, printout, or editing view.
const wxPoint & GetStart() const
static wxString GetDefaultFileExtension()
const wxPoint & GetStart() const
int GetEffectiveTextPenWidth(int aDefaultWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
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=NULL)
Draws text with the plotter.
static wxString GetDefaultFileExtension()
Base class to handle basic graphic items.
const VECTOR2I & CPoint(int aIndex) const
Function Point()
static const int USE_DEFAULT_LINE_WIDTH
SHAPE_POLY_SET & GetPolygons()
DS_DRAW_ITEM_BASE * GetNext()
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
BITMAP_BASE * m_ImageBitmap
SHAPE_LINE_CHAIN & Outline(int aIndex)
PLOT_FORMAT
The set of supported output plot formats.
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
Describe the page size and margins of a paper page on which to eventually print or plot.
const wxSize & GetTextSize() const
double GetIUsPerDecimil() const
The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establ...
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
bool IsMultilineAllowed() const
void MoveTo(const wxPoint &pos)
Non filled rectangle with thick segment.
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the page layout.
Base plotter engine class.
DS_DATA_ITEM * GetPeer() const
RENDER_SETTINGS * RenderSettings()
void PlotImage(PLOTTER *aPlotter, const wxPoint &aPos, KIGFX::COLOR4D aDefaultColor, int aDefaultPensize)
Plot bitmap on plotter.
void PlotDrawingSheet(PLOTTER *plotter, const PROJECT *aProject, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, const wxString &aSheetNumber, int aSheetCount, const wxString &aSheetDesc, const wxString &aFilename, COLOR4D aColor, bool aIsFirstPage)
static wxString GetDefaultFileExtension()
void SetProject(const PROJECT *aProject)
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
int GetDefaultPenWidth() const
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
const wxPoint & GetTextPos() const
const wxPoint & GetEnd() const
virtual int GetPenWidth() const
DS_DRAW_ITEM_BASE * GetFirst()
virtual wxString GetShownText(int aDepth=0) const
Return the string actually shown after processing of the base text.
const wxPoint & GetEnd() const
virtual void SetCurrentLineWidth(int width, void *aData=NULL)=0
Set the line width for the next drawing.
A color representation with 4 components: red, green, blue, alpha.
bool GetColorMode() const