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.

37 lines
1018 B
C++

#pragma once
class CSigmaDoc;
class HTrackerBound
{
public:
class CPathItem
{
public:
CPathItem();
virtual ~CPathItem();
BOOL Load(Gdiplus::GraphicsPath& path);
void Clear(void);
Gdiplus::GraphicsPath *m_pGraphicsPath;
LPPOINT m_pPathPoints;
LPBYTE m_pPathTypes;
CRect m_rect;
};
public:
HTrackerBound();
bool CreateBoundRect(CSigmaDoc * pDoc, CPositionList & selectionSet, CRect & boundRectOut);
bool ReCreateBoundRect(CRect & boundRectOut);
private:
void CopySelectionSet(CPositionList & selectionSet);
//获得COne的路径
void GetCOnePath(POSITION pos, Gdiplus::GraphicsPath & pathOut);
void GetCOnePath(COne* pOne, Gdiplus::GraphicsPath & pathOut);
void LoadRectPath(Gdiplus::GraphicsPath& path, CRect8 rect);
void LoadCurvePath(Gdiplus::GraphicsPath& path, CCurveEx* pc);
void CalculateBoundRect(Gdiplus::GraphicsPath & path, CArray<CPathItem*, CPathItem*> & arrayPathIn);
protected:
CPositionList m_selectionSet; //选择集
CRect m_boundRect; //tracker的边界
CSigmaDoc * m_pDoc;
};