Code clarity.
This commit is contained in:
parent
563b67f9a0
commit
d0023add81
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue