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

Module texts are now moveable, rotatable and flippable.

parent 8a015706
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -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 )
+9 −0
Original line number Diff line number Diff line
@@ -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; }