Properties: Add text orientation
This commit is contained in:
parent
2091aaba2f
commit
70f9d8cab9
|
@ -1023,6 +1023,10 @@ static struct EDA_TEXT_DESC
|
||||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||||
REGISTER_TYPE( EDA_TEXT );
|
REGISTER_TYPE( EDA_TEXT );
|
||||||
|
|
||||||
|
propMgr.AddProperty( new PROPERTY<EDA_TEXT, double>( _HKI( "Orientation" ),
|
||||||
|
&EDA_TEXT::SetTextAngleDegrees, &EDA_TEXT::GetTextAngleDegrees,
|
||||||
|
PROPERTY_DISPLAY::PT_DEGREE ) );
|
||||||
|
|
||||||
const wxString textProps = _( "Text Properties" );
|
const wxString textProps = _( "Text Properties" );
|
||||||
|
|
||||||
propMgr.AddProperty( new PROPERTY<EDA_TEXT, wxString>( _HKI( "Text" ),
|
propMgr.AddProperty( new PROPERTY<EDA_TEXT, wxString>( _HKI( "Text" ),
|
||||||
|
|
|
@ -119,6 +119,13 @@ public:
|
||||||
virtual void SetTextAngle( const EDA_ANGLE& aAngle );
|
virtual void SetTextAngle( const EDA_ANGLE& aAngle );
|
||||||
const EDA_ANGLE& GetTextAngle() const { return m_attributes.m_Angle; }
|
const EDA_ANGLE& GetTextAngle() const { return m_attributes.m_Angle; }
|
||||||
|
|
||||||
|
// For property system:
|
||||||
|
void SetTextAngleDegrees( double aOrientation )
|
||||||
|
{
|
||||||
|
SetTextAngle( EDA_ANGLE( aOrientation, DEGREES_T ) );
|
||||||
|
}
|
||||||
|
double GetTextAngleDegrees() const { return m_attributes.m_Angle.AsDegrees(); }
|
||||||
|
|
||||||
void SetItalic( bool aItalic );
|
void SetItalic( bool aItalic );
|
||||||
bool IsItalic() const { return m_attributes.m_Italic; }
|
bool IsItalic() const { return m_attributes.m_Italic; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue