#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 & arrayPathIn); protected: CPositionList m_selectionSet; //选择集 CRect m_boundRect; //tracker的边界 CSigmaDoc * m_pDoc; };