Line1.h
资源名称:CAD2006.rar [点击查看]
上传用户:ckg1000
上传日期:2013-01-26
资源大小:630k
文件大小:2k
源码类别:
CAD
开发平台:
Visual C++
- // Line1.h: interface for the CLine class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_LINE1_H__2B80900E_3B87_41D1_BC24_6A73C8E523EB__INCLUDED_)
- #define AFX_LINE1_H__2B80900E_3B87_41D1_BC24_6A73C8E523EB__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- enum STATE{noClick, Clicked};
- #include "shape.h"
- extern int m_angle;
- class CLine : public CShape
- {
- public:
- CLine();
- virtual ~CLine();
- public:
- STATE m_toolState; //工具状态
- POINT m_ptBeginPos; //起始点坐标
- POINT m_ptEndPos; //结束点坐标
- POINT m_ptOldPos;
- bool KILLRECT;
- POINT m_MirBegPt; //镜像直线起点
- POINT m_MirEndPt;
- POINT m_oldPt;
- POINT m_FirstMirPt; //镜像后的点
- POINT m_SecondMirPt;
- bool blnlinetemp; //保存镜像点状态
- public:
- void SetAngle(int m_angle);
- void Update(CDC *pDC);
- void OnMirLBtnDn(CDC *pDC,CPoint point);
- POINT GetMirPt(const POINT& ptBegin, const POINT& ptEnd,POINT ptCur);
- void KillMirLine(CDC *pDC);
- void DrawMirLine(CDC *pDC,POINT MirBegPt, POINT MirEndPt);
- void Mirror(CDC *pDoc,CPoint point);
- bool SelectOnePt(CDC *pDC,CPoint point);
- void Zoom(CDC *pDoc,CPoint point);
- void Rotate(CDC *pDC,CPoint point);
- void Move(CDC *pDoc,CPoint point);
- void SetPosEnd(CPoint point);
- void SetPosBegin(CPoint);
- int Distance(POINT ptPos1, POINT ptPos2);
- bool pick(POINT pt);
- CPoint GetPosEnd();
- CPoint GetPosBegin();
- virtual void OnLbuttondown(CDC *pDC,CPoint point);
- virtual void Onmousemove(CDC *pDC,CPoint point);
- virtual void Draw(CDC *pDC);
- bool Select(CDC *pDC,CPoint point);
- void DrawRect(CDC *pDC);
- POINT CalRotatePt(POINT ptCenter,POINT ptPos,double dbAngle);
- void Delete(CDC *pDC);
- };
- #endif // !defined(AFX_LINE1_H__2B80900E_3B87_41D1_BC24_6A73C8E523EB__INCLUDED_)