Commit 2a45987d authored by Maciej Suminski's avatar Maciej Suminski

Module texts are now moveable, rotatable and flippable.

parent 8a015706
......@@ -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 )
......
......@@ -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; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment