Esempio n. 1
0
 public Arc(eArcType type)
 {
     m_arcType = type;
     m_curPoint = eCurrentPoint.p1;
     if (m_arcType == eArcType.typeCenterRadius)
         m_curPoint = eCurrentPoint.center;
 }
Esempio n. 2
0
 public Arc(eArcType type)
 {
     m_arcType  = type;
     m_curPoint = eCurrentPoint.p1;
     if (m_arcType == eArcType.typeCenterRadius)
     {
         m_curPoint = eCurrentPoint.center;
     }
 }
Esempio n. 3
0
 public Arc3Point(eArcType type)
 {
     m_type     = type;
     m_curPoint = eCurrentPoint.p1;
 }
Esempio n. 4
0
 public virtual void OnKeyDown(ICanvas canvas, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.D && (m_curPoint == eCurrentPoint.startAngle || m_curPoint == eCurrentPoint.endAngle))
     {
         if (Direction == eDirection.kCW)
             Direction = eDirection.kCCW;
         else
             Direction = eDirection.kCW;
         e.Handled = true;
     }
     if (e.KeyCode == Keys.C) // switch to centerRadius mode
     {
         m_center = UnitPoint.Empty;
         m_radius = 0;
         m_startAngle = 0;
         m_endAngle = 0;
         m_arcType = eArcType.typeCenterRadius;
         m_curPoint = eCurrentPoint.center;
         e.Handled = true;
         canvas.Invalidate();
     }
     if (e.KeyCode == Keys.D2) // switch to 2 pointmode
     {
         m_center = UnitPoint.Empty;
         m_radius = 0;
         m_startAngle = 0;
         m_endAngle = 0;
         m_arcType = eArcType.type2point;
         m_curPoint = eCurrentPoint.p1;
         e.Handled = true;
         canvas.Invalidate();
     }
 }
Esempio n. 5
0
 public void Copy(Arc acopy)
 {
     base.Copy(acopy);
     Center = acopy.Center;
     Radius = acopy.Radius;
     StartAngle = acopy.StartAngle;
     EndAngle = acopy.EndAngle;
     Selected = acopy.Selected;
     Direction = acopy.Direction;
     m_arcType = acopy.m_arcType;
     m_curPoint = acopy.m_curPoint;
 }
Esempio n. 6
0
 public Arc3Point(eArcType type)
 {
     m_type = type;
     m_curPoint = eCurrentPoint.p1;
 }