CEllipse.h 1.3 KB

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