Module texts are now moveable, rotatable and flippable.

This commit is contained in:
Maciej Suminski 2013-09-03 14:15:37 +02:00
parent 8a0157069b
commit 2a45987d46
2 changed files with 25 additions and 0 deletions

View File

@ -87,6 +87,22 @@ TEXTE_MODULE::~TEXTE_MODULE()
}
void TEXTE_MODULE::Rotate( const wxPoint& aRotCentre, double aAngle )
{
RotatePoint( &m_Pos, aRotCentre, aAngle );
m_Orient += aAngle;
NORMALIZE_ANGLE_360( m_Orient );
}
void TEXTE_MODULE::Flip(const wxPoint& aCentre )
{
m_Pos.y = aCentre.y - ( m_Pos.y - aCentre.y );
SetLayer( FlipLayer( GetLayer() ) );
m_Mirror = !m_Mirror;
}
void TEXTE_MODULE::Copy( TEXTE_MODULE* source )
{
if( source == NULL )

View File

@ -89,6 +89,15 @@ public:
m_Pos = aPos;
}
void Move( const wxPoint& aMoveVector )
{
m_Pos += aMoveVector;
}
void Rotate( const wxPoint& aRotCentre, double aAngle );
void Flip( const wxPoint& aCentre );
TEXTE_MODULE* Next() const { return (TEXTE_MODULE*) Pnext; }
TEXTE_MODULE* Back() const { return (TEXTE_MODULE*) Pback; }