34#include <wx/filename.h>
47 default: wxFAIL;
return wxEmptyString;
53 const PAGE_INFO& aPageInfo,
const std::map<wxString, wxString>* aProperties,
54 const wxString& aSheetNumber,
int aSheetCount,
const wxString& aSheetName,
55 const wxString& aSheetPath,
const wxString& aFilename,
COLOR4D aColor,
71 wxFileName fn( aFilename );
113 switch( item->Type() )
151 int penWidth = std::max(
text->GetEffectiveTextPenWidth(), defaultPenWidth );
154 text->GetTextAngle(),
text->GetTextSize(),
text->GetHorizJustify(),
155 text->GetVertJustify(), penWidth,
text->IsItalic(),
text->IsBold(),
156 text->IsMultilineAllowed(), font,
text->GetFontMetrics() );
164 std::vector<VECTOR2I> points;
171 for(
int ii = 0; ii < outline.
PointCount(); ii++ )
172 points.emplace_back( outline.
CPoint( ii ).
x, outline.
CPoint( ii ).
y );
180 wxFAIL_MSG( wxT(
"PlotDrawingSheet(): Unknown drawing sheet item." ) );
constexpr EDA_IU_SCALE unityScale
void PlotImage(PLOTTER *aPlotter, const VECTOR2I &aPos, const KIGFX::COLOR4D &aDefaultColor, int aDefaultPensize) const
Plot bitmap on plotter.
BITMAP_BASE * m_ImageBitmap
Base class to handle basic graphic items.
virtual int GetPenWidth() const
DS_DATA_ITEM * GetPeer() const
VECTOR2I GetPosition() const override
const VECTOR2I & GetStart() const
const VECTOR2I & GetEnd() const
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
void SetPlotterMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to plot units.
DS_DRAW_ITEM_BASE * GetFirst()
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
void SetSheetPath(const wxString &aSheetPath)
Set the sheet path to draw/plot.
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
void SetDefaultPenSize(int aPenSize)
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
void SetProperties(const std::map< wxString, wxString > *aProps)
Set properties used for text variable resolution.
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
DS_DRAW_ITEM_BASE * GetNext()
void SetProject(const PROJECT *aProject)
SHAPE_POLY_SET & GetPolygons()
Non filled rectangle with thick segment.
const VECTOR2I & GetEnd() const
const VECTOR2I & GetStart() const
static wxString GetDefaultFileExtension()
static wxString GetDefaultFileExtension()
static wxString GetDefaultFileExtension()
FONT is an abstract base class for both outline and stroke fonts.
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
static const COLOR4D BLACK
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
int GetDefaultPenWidth() const
const wxString & GetDefaultFont() const
const wxString & GetLayerName() const
Describe the page size and margins of a paper page on which to eventually print or plot.
static wxString GetDefaultFileExtension()
Base plotter engine class.
static const int USE_DEFAULT_LINE_WIDTH
void MoveTo(const VECTOR2I &pos)
void FinishTo(const VECTOR2I &pos)
RENDER_SETTINGS * RenderSettings()
double GetIUsPerDecimil() const
The IUs per decimil are an essential scaling factor when plotting; they are set and saved when establ...
bool GetColorMode() const
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
void LineTo(const VECTOR2I &pos)
virtual void PlotPoly(const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
Draw a polygon ( filled or not ).
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 aPenWidth, bool aItalic, bool aBold, bool aMultilineAllowed, KIFONT::FONT *aFont, const KIFONT::METRICS &aFontMetrics, void *aData=nullptr)
Draw text with the plotter.
virtual void SetColor(const COLOR4D &color)=0
Container for project specific data.
static wxString GetDefaultFileExtension()
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int PointCount() const
Return the number of points (vertices) in this line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
int OutlineCount() const
Return the number of outlines in the set.
static wxString GetDefaultFileExtension()
Hold the information shown in the lower right corner of a plot, printout, or editing view.
wxString GetDefaultPlotExtension(PLOT_FORMAT aFormat)
Returns the default plot extension for a format.
void PlotDrawingSheet(PLOTTER *plotter, const PROJECT *aProject, const TITLE_BLOCK &aTitleBlock, const PAGE_INFO &aPageInfo, const std::map< wxString, wxString > *aProperties, const wxString &aSheetNumber, int aSheetCount, const wxString &aSheetName, const wxString &aSheetPath, const wxString &aFilename, COLOR4D aColor, bool aIsFirstPage)
PLOT_FORMAT
The set of supported output plot formats.
Plotting engines similar to ps (PostScript, Gerber, svg)
VECTOR2< int32_t > VECTOR2I