Rect.h
资源名称:CAD2006.rar [点击查看]
上传用户:ckg1000
上传日期:2013-01-26
资源大小:630k
文件大小:2k
源码类别:
CAD
开发平台:
Visual C++
- // Rect.h: interface for the CRect class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_RECT_H__15658AD2_5A5F_450A_8E03_2D0A28967A8F__INCLUDED_)
- #define AFX_RECT_H__15658AD2_5A5F_450A_8E03_2D0A28967A8F__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "Shape.h"
- extern enum STATUS;
- /***************** 矩形类 徐讷讷 ***************/
- class CRectangle : public CShape
- {
- public:
- void DrawMirLine(CDC *pDC,POINT MirBegPt, POINT MirEndPt);
- void Mirror(CDC *pDoc,CPoint point);
- void Zoom(CDC *pDoc,CPoint point);
- void Move(CDC *pDC,CPoint point);
- void KillMirLine(CDC *pDC);
- void Update(CDC *pDC);
- void SetPosEnd(CPoint point);
- void SetPosBegin(CPoint point);
- CPoint GetPosEnd();
- CPoint GetPosBegin();
- bool IsOnRect(POINT curPt);
- void DrawRound(CDC *pDC,COLORREF colorRound = RGB(255,0,0) );
- virtual bool Select(CDC *pDC,CPoint point);
- virtual void Draw(CDC * pDC);
- virtual void Onmousemove(CDC *pDC,CPoint point);
- virtual void OnLbuttondown(CDC *pDC,CPoint point);
- void DrawMove(CDC *pDC, POINT begPt,POINT endPt, POINT begOldPt, POINT endOldPt);
- void DrawFourSdMe( CDC *pDC,POINT onePt, POINT twoPt, POINT threePt, POINT fourPt,
- POINT oneOdPt,POINT twoOdPt, POINT threeOdPt, POINT fourOdPt);
- POINT GetMirPt(const POINT& ptBegin, const POINT& ptEnd,POINT ptCur);
- int Distance(POINT Pt1, POINT Pt2);
- void OnMirLBtnDn(CDC *pDC,CPoint point);
- void Delete(CDC *pDC);
- CRectangle();
- virtual ~CRectangle();
- POINT m_begPt; //矩形起点
- POINT m_endPt; //矩形终点
- POINT m_oldPt;
- POINT m_FirstMirPt; //镜像后的第1个点
- POINT m_SecondMirPt; //镜像后的第2个点
- POINT m_ThirdMirPt; //镜像后的第3个点
- POINT m_FourMirPt; //镜像后的第4个点
- POINT m_MirBegPt; //镜像直线起点
- POINT m_MirEndPt; //镜像直线终点
- STATUS m_status; //鼠标电极状态
- };
- #endif // !defined(AFX_RECT_H__15658AD2_5A5F_450A_8E03_2D0A28967A8F__INCLUDED_)