mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Use symbol line width schematic setting when printing and plotting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20574
This commit is contained in:
parent
3d29fae7a9
commit
1176ff4a15
@ -65,7 +65,7 @@ bool SCH_EDIT_FRAME::LoadProjectSettings()
|
||||
GetRenderSettings()->m_LabelSizeRatio = settings.m_LabelSizeRatio;
|
||||
GetRenderSettings()->m_TextOffsetRatio = settings.m_TextOffsetRatio;
|
||||
GetRenderSettings()->m_PinSymbolSize = settings.m_PinSymbolSize;
|
||||
|
||||
GetRenderSettings()->m_SymbolLineWidth = settings.m_DefaultLineWidth;
|
||||
GetRenderSettings()->SetDashLengthRatio( settings.m_DashedLineDashRatio );
|
||||
GetRenderSettings()->SetGapLengthRatio( settings.m_DashedLineGapRatio );
|
||||
|
||||
@ -151,6 +151,7 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage )
|
||||
GetRenderSettings()->m_LabelSizeRatio = Schematic().Settings().m_LabelSizeRatio;
|
||||
GetRenderSettings()->m_TextOffsetRatio = Schematic().Settings().m_TextOffsetRatio;
|
||||
GetRenderSettings()->m_PinSymbolSize = Schematic().Settings().m_PinSymbolSize;
|
||||
GetRenderSettings()->m_SymbolLineWidth = Schematic().Settings().m_DefaultLineWidth;
|
||||
|
||||
GetRenderSettings()->SetDashLengthRatio( Schematic().Settings().m_DashedLineDashRatio );
|
||||
GetRenderSettings()->SetGapLengthRatio( Schematic().Settings().m_DashedLineGapRatio );
|
||||
|
@ -180,6 +180,9 @@ bool SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen, wxDC* aDC, bool aForPrinting
|
||||
// Init the SCH_RENDER_SETTINGS used by the painter used to print schematic
|
||||
SCH_RENDER_SETTINGS* dstSettings = painter->GetSettings();
|
||||
|
||||
if( aForPrinting )
|
||||
*dstSettings = *m_parent->GetRenderSettings();
|
||||
|
||||
dstSettings->m_ShowPinsElectricalType = false;
|
||||
|
||||
// Set the color scheme
|
||||
|
@ -496,11 +496,20 @@ int SCH_ITEM::GetEffectivePenWidth( const SCH_RENDER_SETTINGS* aSettings ) const
|
||||
// numbers meant "don't stroke".
|
||||
|
||||
if( GetPenWidth() < 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if( GetPenWidth() == 0 )
|
||||
return std::max( aSettings->GetDefaultPenWidth(), aSettings->GetMinPenWidth() );
|
||||
{
|
||||
if( GetParent() && GetParent()->Type() == LIB_SYMBOL_T )
|
||||
return std::max( aSettings->m_SymbolLineWidth, aSettings->GetMinPenWidth() );
|
||||
else
|
||||
return std::max( aSettings->GetDefaultPenWidth(), aSettings->GetMinPenWidth() );
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::max( GetPenWidth(), aSettings->GetMinPenWidth() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,6 +48,7 @@ SCH_RENDER_SETTINGS::SCH_RENDER_SETTINGS() :
|
||||
m_LabelSizeRatio( DEFAULT_LABEL_SIZE_RATIO ),
|
||||
m_TextOffsetRatio( DEFAULT_TEXT_OFFSET_RATIO ),
|
||||
m_PinSymbolSize( DEFAULT_TEXT_SIZE * schIUScale.IU_PER_MILS / 2 ),
|
||||
m_SymbolLineWidth( DEFAULT_LINE_WIDTH_MILS * schIUScale.IU_PER_MILS ),
|
||||
m_Transform()
|
||||
{
|
||||
SetDefaultPenWidth( DEFAULT_LINE_WIDTH_MILS * schIUScale.IU_PER_MILS );
|
||||
|
@ -100,6 +100,7 @@ public:
|
||||
double m_TextOffsetRatio; // Proportion of font size to offset text above/below
|
||||
// wires, buses, etc.
|
||||
int m_PinSymbolSize;
|
||||
int m_SymbolLineWidth; ///< Override line widths for symbol drawing objects set to default line width.
|
||||
|
||||
TRANSFORM m_Transform;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user