|
KiCad PCB EDA Suite
|
#include <wx/filename.h>#include <wx/string.h>#include <wx/gdicmn.h>#include <page_info.h>#include <sch_render_settings.h>#include <sch_sheet_path.h>#include <plotters/plotter.h>#include <plotters/plotter_png.h>Go to the source code of this file.
Classes | |
| struct | SCH_PLOT_OPTS |
| class | SCH_PLOTTER |
| Schematic plotting class. More... | |
| class | RENDER_SETTINGS |
| Container for all the knowledge about how graphical objects are drawn on any output surface/device. More... | |
Enumerations | |
| enum | PageFormatReq { PAGE_SIZE_AUTO , PAGE_SIZE_A4 , PAGE_SIZE_A } |
Functions | |
| BOX2I | GetSymbolPlotBBox (const LIB_SYMBOL &aSymbol, int aUnit, int aBodyStyle, bool aIncludeHiddenFields) |
| Compute the bounding box used to size a symbol SVG plot. | |
| bool | PlotSymbolToSVG (LIB_SYMBOL &aDrawSymbol, LIB_SYMBOL &aFieldsSymbol, int aUnit, int aBodyStyle, const BOX2I &aBBox, SCH_RENDER_SETTINGS &aRenderSettings, bool aBlackAndWhite, const wxString &aFileName, REPORTER *aReporter=nullptr) |
| Plot a single symbol variant (unit and body style) to an SVG file. | |
| enum PageFormatReq |
| Enumerator | |
|---|---|
| PAGE_SIZE_AUTO | |
| PAGE_SIZE_A4 | |
| PAGE_SIZE_A | |
Definition at line 44 of file sch_plotter.h.
| BOX2I GetSymbolPlotBBox | ( | const LIB_SYMBOL & | aSymbol, |
| int | aUnit, | ||
| int | aBodyStyle, | ||
| bool | aIncludeHiddenFields ) |
Compute the bounding box used to size a symbol SVG plot.
The symbol's unit bounding box, is inflated by a small margin so the drawing does not touch the page edges.
| aSymbol | is the symbol to measure (may be a derived symbol). |
| aUnit | is the unit to measure (1-based). |
| aBodyStyle | is the body style to measure (1-based). |
| aIncludeHiddenFields | when true, hidden fields are included in the bounding box. |
Definition at line 1153 of file sch_plotter.cpp.
References LIB_SYMBOL::Flatten(), BOX2< Vec >::Inflate(), and schIUScale.
Referenced by EESCHEMA_JOBS_HANDLER::doSymExportSvg(), SYMBOL_SVG_EXPORT_FIXTURE::PlotToSvgString(), and SYMBOL_EDIT_FRAME::SVGPlotSymbol().
| bool PlotSymbolToSVG | ( | LIB_SYMBOL & | aDrawSymbol, |
| LIB_SYMBOL & | aFieldsSymbol, | ||
| int | aUnit, | ||
| int | aBodyStyle, | ||
| const BOX2I & | aBBox, | ||
| SCH_RENDER_SETTINGS & | aRenderSettings, | ||
| bool | aBlackAndWhite, | ||
| const wxString & | aFileName, | ||
| REPORTER * | aReporter = nullptr ) |
Plot a single symbol variant (unit and body style) to an SVG file.
The page is sized to aBBox and the symbol is plotted with its origin at the SVG origin; the SVG viewBox covers the whole bounding box, which may extend to negative coordinates.
| aDrawSymbol | is the symbol whose draw items are plotted. For derived (alias) symbols this is the root symbol, which holds the draw items. |
| aFieldsSymbol | is the symbol whose fields are plotted. For aliases this is the derived symbol. |
| aUnit | is the unit to plot (1-based). |
| aBodyStyle | is the body style to plot (1-based). |
| aBBox | is the bounding box used to size the page and the SVG viewBox this may be computed using GetSymbolPlotBBox, or by some other means. |
| aRenderSettings | the render settings used for the plot. |
| aBlackAndWhite | when true, plot without color. |
| aFileName | the full path of the SVG file to create. |
| aReporter | optional reporter for error messages. |
Definition at line 1172 of file sch_plotter.cpp.
References _, BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), LIB_SYMBOL::Plot(), LIB_SYMBOL::PlotFields(), REPORTER::Report(), RPT_SEVERITY_ERROR, schIUScale, PAGE_INFO::SetHeightMils(), PAGE_INFO::SetWidthMils(), and User.
Referenced by EESCHEMA_JOBS_HANDLER::doSymExportSvg(), SYMBOL_SVG_EXPORT_FIXTURE::PlotToSvgString(), and SYMBOL_EDIT_FRAME::SVGPlotSymbol().