Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

  1. #ifndef __T_CURVE_H__
  2. #define __T_CURVE_H__
  3. #include "imgtools.h"
  4. #define MAX_ANCHOR_POINTS 4 // endpoints the user selects (buttondown).
  5. class CCurveTool : public CRubberTool
  6. {
  7. DECLARE_DYNAMIC(CCurveTool)
  8. protected:
  9. POINT m_PolyPoints[MAX_ANCHOR_POINTS];
  10. CRect m_cRectBounding;
  11. int m_iNumAnchorPoints;
  12. void AdjustBoundingRect(void);
  13. void AddPoint(POINT ptNewPoint);
  14. void SetCurrentPoint(POINT ptNewPoint);
  15. BOOL DrawCurve(CDC* pDC);
  16. virtual void AdjustPointsForConstraint(MTI *pmti);
  17. virtual void PreProcessPoints(MTI *pmti);
  18. public:
  19. CCurveTool();
  20. ~CCurveTool();
  21. virtual void Render(CDC* pDC, CRect& rect, BOOL bDraw, BOOL bCommit, BOOL bCtrlDown);
  22. virtual void OnStartDrag(CImgWnd* pImgWnd, MTI* pmti );
  23. virtual void OnEndDrag(CImgWnd* pImgWnd, MTI* pmti );
  24. virtual void OnDrag(CImgWnd* pImgWnd, MTI* pmti );
  25. virtual void OnCancel(CImgWnd* pImgWnd);
  26. virtual void EndMultiptOperation(BOOL bAbort = FALSE);
  27. virtual void OnActivate( BOOL bActivate );
  28. BOOL CanEndMultiptOperation(MTI* pmti );
  29. };
  30. #endif // __T_CURVE_H__