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.
26 lines
1.2 KiB
C++
26 lines
1.2 KiB
C++
#pragma once
|
|
#include "mousetool.h"
|
|
|
|
class CObjPline;
|
|
class CCommandCut;
|
|
class CMouseToolCut :public CMouseTool
|
|
{
|
|
public:
|
|
CMouseToolCut(void);
|
|
~CMouseToolCut(void);
|
|
virtual void OnLButtonDown(UINT nFlags, CPoint point,CClientDC &dc);
|
|
private:
|
|
void CutLineInRect(DbRect &rect);
|
|
void CalAllIntersection(Dbxy pt1,Dbxy pt2,DbRect &LineRect,vector<DbLine> &LineVec,vector<Dbxy> &PointVec);
|
|
void CutObj(Dbxy LinePt1,Dbxy LinePt2,Sptr<CObjBase> pObj,vector<Dbxy> &PointVec,DbRect &rect);
|
|
bool IsSelLine(Dbxy LinePt1,Dbxy LinePt2,Dbxy pt,Dbxy Nextpt);
|
|
void GetNearFarPoint(Dbxy pt1,Dbxy pt2,Dbxy pt,Dbxy &NearPt,Dbxy &FarPt);
|
|
DbRect GetLineRect(const Dbxy &LinePt1,const Dbxy &LinePt2);
|
|
bool GetCutPoint(Dbxy LinePt1,Dbxy LinePt2,vector<Dbxy> &PointVec,DbRect &rect,Dbxy &CutPt1,Dbxy &CutPt2);
|
|
bool CutObjExt(Dbxy LinePt1,Dbxy LinePt2,Sptr<CObjBase> pObj,Dbxy CutPt1,Dbxy CutPt2,CObjPline *&pObj1,CObjPline *&pObj2);
|
|
void CreatCommandCut(Sptr<CObjBase> pObj,CObjPline *&pObj1,CObjPline *&pObj2);
|
|
void AddToCmd(CObjPline *&pObj,CCommandCut *&pCommandCut);
|
|
void GetFirstLineInRect(Sptr<CObjBase> &pObj,DbRect &rect,Dbxy &LinePt1,Dbxy &LinePt2);
|
|
};
|
|
|