Ejemplo n.º 1
0
        void OnHandleMoved(GrabHandle sender, PointF oldLocation, PointF newLocation)
        {
            m_Points[sender.Index] = newLocation;
            switch (sender.Index)
            {
            case 0:     //TL
                m_Points[2].X = m_Points[0].X;
                m_Points[1].Y = m_Points[0].Y;
                break;

            case 1:     //TR
                m_Points[3].X = m_Points[1].X;
                m_Points[0].Y = m_Points[1].Y;
                break;

            case 2:     //BL
                m_Points[0].X = m_Points[2].X;
                m_Points[3].Y = m_Points[2].Y;
                break;

            case 3:     //BR
                m_Points[1].X = m_Points[3].X;
                m_Points[2].Y = m_Points[3].Y;
                break;
            }
            MoveHandles();
        }
Ejemplo n.º 2
0
 void OnHandleMoved(GrabHandle sender, PointF oldLocation, PointF newLocation)
 {
     m_Points[sender.Index] = newLocation;
 }