Turn off plotting hidden fields in the svg export cli
This commit is contained in:
parent
e056c96c10
commit
c57e6db79a
|
@ -394,22 +394,18 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
|
|||
|
||||
if( symbol )
|
||||
{
|
||||
constexpr bool background = true;
|
||||
TRANSFORM temp; // Uses default transform
|
||||
VECTOR2I plotPos;
|
||||
bool background = true;
|
||||
TRANSFORM temp; // Uses default transform
|
||||
VECTOR2I plotPos;
|
||||
|
||||
plotPos.x = pageInfo.GetWidthIU( schIUScale.IU_PER_MILS ) / 2;
|
||||
plotPos.y = pageInfo.GetHeightIU( schIUScale.IU_PER_MILS ) / 2;
|
||||
|
||||
symbol->Plot( plotter, unit, convert, background, plotPos, temp, false );
|
||||
|
||||
// Plot lib fields, not plotted by m_symbol->Plot():
|
||||
symbol->PlotLibFields( plotter, unit, convert, background, plotPos, temp, false );
|
||||
symbol->PlotLibFields( plotter, unit, convert, background, plotPos, temp, false, false );
|
||||
|
||||
symbol->Plot( plotter, unit, convert, !background, plotPos, temp, false );
|
||||
|
||||
// Plot lib fields, not plotted by m_symbol->Plot():
|
||||
symbol->PlotLibFields( plotter, unit, convert, !background, plotPos, temp, false );
|
||||
symbol->PlotLibFields( plotter, unit, convert, !background, plotPos, temp, false, false );
|
||||
}
|
||||
|
||||
plotter->EndPlot();
|
||||
|
@ -424,7 +420,10 @@ int EESCHEMA_JOBS_HANDLER::JobSymExportSvg( JOB* aJob )
|
|||
{
|
||||
JOB_SYM_EXPORT_SVG* svgJob = dynamic_cast<JOB_SYM_EXPORT_SVG*>( aJob );
|
||||
|
||||
SCH_SEXPR_PLUGIN_CACHE schLibrary( svgJob->m_libraryPath );
|
||||
wxFileName fn( svgJob->m_libraryPath );
|
||||
fn.MakeAbsolute();
|
||||
|
||||
SCH_SEXPR_PLUGIN_CACHE schLibrary( fn.GetFullPath() );
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -741,7 +741,8 @@ void LIB_SYMBOL::Plot( PLOTTER *aPlotter, int aUnit, int aConvert, bool aBackgro
|
|||
|
||||
|
||||
void LIB_SYMBOL::PlotLibFields( PLOTTER* aPlotter, int aUnit, int aConvert, bool aBackground,
|
||||
const VECTOR2I& aOffset, const TRANSFORM& aTransform, bool aDimmed )
|
||||
const VECTOR2I& aOffset, const TRANSFORM& aTransform, bool aDimmed,
|
||||
bool aPlotHidden )
|
||||
{
|
||||
wxASSERT( aPlotter != nullptr );
|
||||
|
||||
|
@ -761,6 +762,9 @@ void LIB_SYMBOL::PlotLibFields( PLOTTER* aPlotter, int aUnit, int aConvert, bool
|
|||
if( item.Type() != LIB_FIELD_T )
|
||||
continue;
|
||||
|
||||
if( !aPlotHidden && !( (LIB_FIELD&) item ).IsVisible() )
|
||||
continue;
|
||||
|
||||
if( aUnit && item.m_unit && ( item.m_unit != aUnit ) )
|
||||
continue;
|
||||
|
||||
|
|
|
@ -370,7 +370,7 @@ public:
|
|||
* @param aDimmed - reduce brightness of fields
|
||||
*/
|
||||
void PlotLibFields( PLOTTER* aPlotter, int aUnit, int aConvert, bool aBackground,
|
||||
const VECTOR2I& aOffset, const TRANSFORM& aTransform, bool aDimmed );
|
||||
const VECTOR2I& aOffset, const TRANSFORM& aTransform, bool aDimmed, bool aPlotHidden = true );
|
||||
|
||||
/**
|
||||
* Add a new draw \a aItem to the draw object list and sort according to \a aSort.
|
||||
|
|
Loading…
Reference in New Issue