kicad-cli sym export svg: Ensure bounding box is correctly calculated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18062
This commit is contained in:
parent
78cd01038f
commit
3e5ceaa319
|
@ -740,7 +740,7 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
|
|||
}
|
||||
|
||||
// Get the symbol bounding box to fit the plot page to it
|
||||
BOX2I symbolBB = symbol->Flatten()->GetUnitBoundingBox( unit, bodyStyle, false );
|
||||
BOX2I symbolBB = symbol->Flatten()->GetUnitBoundingBox( unit, bodyStyle, !aSvgJob->m_includeHiddenFields );
|
||||
PAGE_INFO pageInfo( PAGE_INFO::Custom );
|
||||
pageInfo.SetHeightMils( schIUScale.IUToMils( symbolBB.GetHeight() * 1.2 ) );
|
||||
pageInfo.SetWidthMils( schIUScale.IUToMils( symbolBB.GetWidth() * 1.2 ) );
|
||||
|
@ -750,7 +750,7 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
|
|||
plotter->SetPageSettings( pageInfo );
|
||||
plotter->SetColorMode( !aSvgJob->m_blackAndWhite );
|
||||
|
||||
VECTOR2I plot_offset;
|
||||
VECTOR2I plot_offset = symbolBB.GetCenter();
|
||||
const double scale = 1.0;
|
||||
|
||||
// Currently, plot units are in decimal
|
||||
|
|
Loading…
Reference in New Issue