Code clarity.

This commit is contained in:
Jeff Young 2022-06-03 22:30:43 +01:00
parent 563b67f9a0
commit d0023add81
2 changed files with 11 additions and 11 deletions

View File

@ -294,24 +294,24 @@ void EDA_TEXT::SwapAttributes( EDA_TEXT& aTradingPartner )
}
int EDA_TEXT::GetEffectiveTextPenWidth( int aDefaultWidth ) const
int EDA_TEXT::GetEffectiveTextPenWidth( int aDefaultPenWidth ) const
{
int width = GetTextThickness();
int penWidth = GetTextThickness();
if( width <= 1 )
if( penWidth <= 1 )
{
width = aDefaultWidth;
penWidth = aDefaultPenWidth;
if( IsBold() )
width = GetPenSizeForBold( GetTextWidth() );
else if( width <= 1 )
width = GetPenSizeForNormal( GetTextWidth() );
penWidth = GetPenSizeForBold( GetTextWidth() );
else if( penWidth <= 1 )
penWidth = GetPenSizeForNormal( GetTextWidth() );
}
// Clip pen size for small texts:
width = Clamp_Text_PenSize( width, GetTextSize(), ALLOW_BOLD_THICKNESS );
penWidth = Clamp_Text_PenSize( penWidth, GetTextSize(), ALLOW_BOLD_THICKNESS );
return width;
return penWidth;
}

View File

@ -120,9 +120,9 @@ public:
int GetTextThickness() const { return m_attributes.m_StrokeWidth; };
/**
* The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
* The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
*/
int GetEffectiveTextPenWidth( int aDefaultWidth = 0 ) const;
int GetEffectiveTextPenWidth( int aDefaultPenWidth = 0 ) const;
virtual void SetTextAngle( const EDA_ANGLE& aAngle );
const EDA_ANGLE& GetTextAngle() const { return m_attributes.m_Angle; }