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.

42 lines
1.4 KiB
C++

#pragma once
#include "ObjBase.h"
#include "ObjContainer.h"
//组合对象
class CObjComposite :public CObjBase
{
public:
CObjComposite(void);
CObjComposite(CObjComposite &rhs);
virtual ~CObjComposite(void);
virtual CObjComposite * Clone(){return new CObjComposite(*this);};
virtual CString GetStr(){return "组合对象";};
virtual OBJ_TYPE GetType(){return _TYPE_COMPOSITE;};
virtual void WriteWorkFileExt(vector<CLab> &LabVec);
virtual void ReadWorkFileExt(CLabVecRang &LabVecRang);
virtual void CreatExt(){};
virtual void Draw(CDC* pDC,CPen &Pen);
virtual bool IsInRect(DbRect rect,bool bNeedAllIn);
virtual void SetSelected(bool bSelected);
virtual void Operate(SObjOperatePar &par);
virtual DbRect GetRect();
virtual void GetPtData(vector<vector<Dbxy>> &vec);
virtual void GetLineInRect(DbRect &rect,vector<DbLine> &DataPtLineVec,bool bGetCatchNode = true);
public:
void AddPt(CDataPoint pt,bool bNewLine);
void Creat();
void SetPosition(Dbxy pt);//设置基准点
protected:
void UpdateSelState();
private:
void SavePar(SObjOperatePar &par);
protected:
CObjContainer m_ObjContainer;//组合模式
Dbxy m_BasePt1;//保存object 当前的位置
Dbxy m_BasePt2;//保存object 当前的位置(用于记录旋转)
double m_Distance;//两个点的距离
};