118 for(
unsigned i = 0; i < sheetList.size(); i++ )
146 plotOffset.x = plotPage.GetWidthIU() / 2;
147 plotOffset.y = -plotPage.GetHeightIU() / 2;
156 fname.Replace(
"/",
"_" );
157 fname.Replace(
"\\",
"_" );
163 if(
Plot_1_Page_HPGL( plotFileName.GetFullPath(), screen, plotPage, aRenderSettings,
166 msg.Printf(
_(
"Plot: \"%s\" OK.\n" ), plotFileName.GetFullPath() );
171 msg.Printf(
_(
"Unable to create file \"%s\".\n" ), plotFileName.GetFullPath() );
177 msg.Printf( wxT(
"HPGL Plotter exception: %s"), e.
What() );
210 switch( aOriginAndUnits )
228 plotter->
SetCreator( wxT(
"Eeschema-HPGL" ) );
230 if( ! plotter->
OpenFile( aFileName ) )
251 aScreen->
Plot( plotter );
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
virtual bool EndPlot() override
HPGL end of plot: sort and emit graphics, pen return and release.
const wxString & GetFileName() const
virtual void SetCreator(const wxString &aCreator)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Implementation of conversion functions that require both schematic and board internal units.
Plotting engines (PostScript, Gerber, HPGL and DXF)
virtual bool OpenFile(const wxString &aFullFilename)
Open or create the plot file aFullFilename.
virtual void SetColorMode(bool aColorMode)
Plot in B/W or color.
int GetVirtualPageNumber() const
void SetRenderSettings(RENDER_SETTINGS *aSettings)
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Set the name of the page type and also the sizes and margins commonly associated with that type name.
virtual void SetPenDiameter(double diameter)
COLOR_SETTINGS * getColorSettings()
A pure virtual class used to derive REPORTER objects from.
void UpdateAllScreenReferences()
Update all the symbol references for this sheet path.
const PAGE_INFO & GetPageSettings() const
virtual bool StartPlot() override
At the start of the HPGL plot pen speed and number are requested.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
HPGL_PLOT_ORIGIN_AND_UNITS
const wxString & GetPageNumber() const
virtual void SetViewport(const wxPoint &aOffset, double aIusPerDecimil, double aScale, bool aMirror) override
Set the plot offset and scaling for the current plot.
void SetUserCoordsFit(bool user_coords_fit)
Set whether the user coordinate system is fit to content.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
wxFileName createPlotFileName(const wxString &aPlotFileName, const wxString &aExtension, REPORTER *aReporter=NULL)
Create a file name with an absolute path name.
static const wxChar * plot_sheet_list(int aSize)
virtual const wxString What() const
A composite of Problem() and Where()
wxChoice * m_paperSizeOption
SCH_EDIT_FRAME * m_parent
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
Describe the page size and margins of a paper page on which to eventually print or plot.
void BuildSheetList(SCH_SHEET *aSheet, bool aCheckIntegrity)
Build the list of sheets and their sheet path from aSheet.
SCHEMATIC & Schematic() const
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
HPGL_PLOT_ORIGIN_AND_UNITS GetPlotOriginAndUnits()
void Plot(PLOTTER *aPlotter)
Plot all the schematic objects to aPlotter.
bool Plot_1_Page_HPGL(const wxString &aFileName, SCH_SCREEN *aScreen, const PAGE_INFO &aPageInfo, RENDER_SETTINGS *aRenderSettings, wxPoint aPlot0ffset, double aScale, bool aPlotFrameRef, HPGL_PLOT_ORIGIN_AND_UNITS aOriginAndUnits)
void SetTargetChordLength(double chord_len)
Set the target length of chords used to draw approximated circles and arcs.
RENDER_SETTINGS * RenderSettings()
SCH_SCREEN * LastScreen()
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
void SetUserCoords(bool user_coords)
Switch to the user coordinate system.
const TITLE_BLOCK & GetTitleBlock() const override
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)
void SortByPageNumbers(bool aUpdateVirtualPageNums=true)
Sorts the list of sheets by page number.
static wxString GetDefaultFileExtension()
wxString GetUniqueFilenameForCurrentSheet()
virtual long long int GetValue()
Return the current value in Internal Units.
void createHPGLFile(bool aPlotAll, bool aPlotFrameRef, RENDER_SETTINGS *aRenderSettings)
SCH_SHEET_PATH & GetCurrentSheet() const
WX_HTML_REPORT_PANEL * m_MessagesBox
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
virtual void LoadColors(const COLOR_SETTINGS *aSettings)
static constexpr int Millimeter2iu(double mm)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)