CEllipseArc.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef CELLIPSEARC
  2. #define CELLIPSEARC
  3. #include"CUnit.h"
  4. #define ROUND(a) ((int)(a+0.5))
  5. class CEllipseArc:public CUnit
  6. {
  7. DECLARE_SERIAL(CEllipseArc)
  8. public:
  9. virtual void OnContextMenu(CWnd *pWnd, CPoint point);
  10. virtual void OnMenuitemCirCu(CDC*pDC,CEastDrawView*pView);
  11. virtual void Serialize(CArchive &ar);
  12. virtual void OnMouseMove(CDC*pDC,CEastDrawView*pView,CPoint point);
  13. virtual void OnLButtonDown(CDC *pDC, CEastDrawView *pView, CPoint point);
  14. virtual void ShowSelectPoint(CDC *pDC);
  15. virtual int IsOnMarginPoint(CPoint point);
  16. virtual BOOL IsInRgn(CPoint point);
  17. virtual CPoint ComputeIntersectionPointSecond(CPoint point);
  18. virtual CPoint ComputeIntersectionPointFirst(CPoint point);
  19. virtual void DrawStatic(CDC*pDC);
  20. virtual void DrawActive(CDC *pDC,CPoint point);
  21. virtual void DrawStaticStepOne(CDC*pDC,CPoint movingPoint);
  22. virtual void PdcSetPixel(CDC *pDC, int xCenter, int yCenter, COLORREF m_PenColor);
  23. virtual void ellipsePlotPoints(CDC*pDC,int xCenter, int yCenter, int x, int y);
  24. virtual void ellipseMidpoint(CDC*pDC,int xCenter, int yCenter, int Rx, int Ry);
  25. virtual float ComputSloap(CPoint firstPoint, CPoint secondPoint);
  26. virtual int ComputRadiusY(CPoint firstPoint,CPoint secondPoint);
  27. virtual int ComputRadiusX(CPoint firstPoint,CPoint secondPoint);
  28. virtual void DrawActiveStepOne(CDC *pDC,CPoint movingPoint);
  29. BOOL m_IsDrawingArc;
  30. double m_CurrentAngle;
  31. BOOL m_IsCirCu;
  32. CEllipseArc();
  33. };
  34. #endif