You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
967 B
C

1 month ago
#pragma once
#include <vector>
class CDC;
class CDC;
class CCurveEx;
class CSigmaDoc;
struct HandlePoint;
class HandleDrawer
{
public:
HandleDrawer(CSigmaDoc * pDoc);
~HandleDrawer();
bool Init(CCurveEx * pCurve);
void ClearAll(CDC * pDC);
void DrawAll(CDC * pDC);
void ReDrawAll(CDC * pDC);
void DrawOneHandle(CDC * pDC, int indexOfHandle);
void DrawFocusHandle(CDC * pDC, int indexOfHandle);
//<2F><><EFBFBD><EFBFBD>ֵ:<3A><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>н<EFBFBD><D0BD><EFBFBD>Handle <20>򷵻<EFBFBD> -1
int EreaseFocusHandle(CDC * pD);
protected:
void DrawAllOrEreaseAll(CDC * pDC, bool bDrawAll);
//bDraw-true <20><><EFBFBD>ƽڵ<C6BD> false-<2D><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> bFocus-true <20>ǽ<EFBFBD><C7BD><EFBFBD>Handle false-<2D><>ͨHandle
void DrawOrEreaseOneHandle(CDC * pDC, HandlePoint * handlePt, bool bDraw, bool bFocus);
void DrawHandle(CDC* pDC, HandlePoint * handlePt, bool bFocus);
void Release();
private:
COLORREF m_colorHandles;
COLORREF m_headColor;
CSigmaDoc * m_pDoc;
HandlePoint * m_focusHandle;
std::vector<HandlePoint *> m_handlePts;
};