|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "SmartPtr.h"
|
|
|
|
|
#include "ObjBase.h"
|
|
|
|
|
#include "GlobalDefine.h"
|
|
|
|
|
#include "ObjContainer.h"
|
|
|
|
|
#include "EnumDirection.h"
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
|
|
|
|
|
class CCreatAreaPar
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CCreatAreaPar()
|
|
|
|
|
{
|
|
|
|
|
m_CircleDia = 300;//Բ<><D4B2>ֱ<EFBFBD><D6B1>
|
|
|
|
|
};
|
|
|
|
|
public:
|
|
|
|
|
double m_CircleDia;//Բ<><D4B2>ֱ<EFBFBD><D6B1>
|
|
|
|
|
vector<double> m_LineCoordyVec;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CLayer
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CLayer(void);
|
|
|
|
|
~CLayer(void);
|
|
|
|
|
CMFCPropertyGridProperty *CreatSpecialGridProperty(CModule *pModule);
|
|
|
|
|
|
|
|
|
|
void Serialize(CArchive& ar);
|
|
|
|
|
void Draw(CDC* pDC);
|
|
|
|
|
void XorRedrawObj(CDC* pDC,bool bNeedSel = true);
|
|
|
|
|
void AddObject(CObjBase *pMarkObject);
|
|
|
|
|
void AddObject(Sptr<CObjBase> p);
|
|
|
|
|
void AddObject(CObjContainer &ObjContainer);
|
|
|
|
|
void AddTmpObject(Sptr<CObjBase> p);
|
|
|
|
|
void DelSelObj();
|
|
|
|
|
void DelObj(Sptr<CObjBase> p);
|
|
|
|
|
void DelObj(CObjContainer &ObjContainer);
|
|
|
|
|
|
|
|
|
|
void ClearTmpObj();
|
|
|
|
|
bool SelObjectInRect(DbRect rect,bool bNeedAllIn);
|
|
|
|
|
void SelAllObj();
|
|
|
|
|
void DelAllObj();
|
|
|
|
|
void NotSelAllObj();
|
|
|
|
|
void RevSelAllObj();
|
|
|
|
|
bool HasSelObjectInRect(DbRect rect);
|
|
|
|
|
bool HasObjSel();
|
|
|
|
|
MOUSE_TOOL JudgeMouseToolType(Dbxy pt);
|
|
|
|
|
void OperateObj(SObjOperatePar &par,bool bAll);
|
|
|
|
|
DbRect GetSelObjRect();
|
|
|
|
|
void OnRotato(double Angle);
|
|
|
|
|
void OnMirror(X_OR_Y xy);
|
|
|
|
|
void OnMove(double MoveX,double MoveY,bool bAddUndo = true);
|
|
|
|
|
void GetLineInRect(DbRect &rect,vector<DbLine> &DataPtLineVec,bool bCatchTemp);
|
|
|
|
|
void CloneObj(CObjContainer &ObjContainer,bool bNeedSel);
|
|
|
|
|
Sptr<CObjBase> GetFirstObjInRect(DbRect &rect);
|
|
|
|
|
Sptr<CObjBase> GetFirstNodeObjInRect(DbRect &rect);
|
|
|
|
|
bool HasObjectInRect(DbRect rect);
|
|
|
|
|
void GetIntersectPoint(DbLine &line,vector<Dbxy> &PointVec);
|
|
|
|
|
bool HasObjIntersectWithLine(DbLine &line);
|
|
|
|
|
void OnReverseSelObj();
|
|
|
|
|
bool OnJoin();
|
|
|
|
|
void OnExplode();
|
|
|
|
|
bool HasSelNodeInRect(DbRect rect);
|
|
|
|
|
void BindingSelObjToDlg();
|
|
|
|
|
bool HasObj(){return !m_ObjContainer->Empty();};
|
|
|
|
|
CObjContainer &GetObjContainer(){return *m_ObjContainer;};
|
|
|
|
|
void FillObj(SFillPar FillPar,bool bNeedSel = true);
|
|
|
|
|
|
|
|
|
|
void OnSpecialPropertyChanged();
|
|
|
|
|
void BindObjContainer(CObjContainer &Container);
|
|
|
|
|
void GetAllPointObjPt(vector<Dbxy> &PtVec);
|
|
|
|
|
void SetSelObjPenNum(int num);
|
|
|
|
|
void SelborderObj(bool bNext);
|
|
|
|
|
void SetbShowObjIdx(bool b){m_bShowObjIdx = b;};
|
|
|
|
|
void SetbShowObjPtCoord(bool b){m_bShowObjPtCoord = b;};
|
|
|
|
|
void SelectedObjInsertToIdx(int idx);
|
|
|
|
|
void ReverseSelObj();
|
|
|
|
|
void SelFirstObj();
|
|
|
|
|
void SetbDrawObj(bool b){m_bDrawObj = b;};
|
|
|
|
|
bool IsbDrawObj(){return m_bDrawObj;};
|
|
|
|
|
void ResetAllMarkObj();
|
|
|
|
|
void Rotato(double Angle);
|
|
|
|
|
void CreatCircleByThreePt();
|
|
|
|
|
void OffsetRotatoObj(COffsetRotatoPar OffsetRotatoPar);
|
|
|
|
|
void MoveScanObj(DIRECTION dir,double Dis);
|
|
|
|
|
void CreatOneLineObj(double Len);
|
|
|
|
|
void ResetAllObjScaned();
|
|
|
|
|
void QuickCreatScanArea(double AreaGap);
|
|
|
|
|
void SetAreaCrossPtRange(double val){m_AreaCrossPtRange = val;};
|
|
|
|
|
private:
|
|
|
|
|
void DrawAllObj(CDC* pDC);
|
|
|
|
|
CObjBase * CreatScanAreaObj(CObjBase *pCircle,vector<Dbxy> PointObjVec,double Coordy1,double Coordy2,double ChangeSizeY,DIRECTION Dir);
|
|
|
|
|
private:
|
|
|
|
|
bool m_bShowObjIdx;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾobj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>idx
|
|
|
|
|
bool m_bShowObjPtCoord;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾobj <20><><EFBFBD><EFBFBD><EFBFBD>Ľڵ<C4BD><DAB5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool m_bDrawObj;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>obj
|
|
|
|
|
CObjContainer *m_ObjContainer;//obj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CObjContainer m_TmpObjContainer;//<2F><>ʱobj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>Ҫ<EFBFBD><D2AA><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>ʱ<EFBFBD><CAB1>)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double m_AreaCrossPtRange;//<2F><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD>㷶Χ
|
|
|
|
|
};
|
|
|
|
|
extern CLayer gLayer;
|