Circle.h
资源名称:CAD2006.rar [点击查看]
上传用户:ckg1000
上传日期:2013-01-26
资源大小:630k
文件大小:2k
源码类别:
CAD
开发平台:
Visual C++
- // Circle.h: interface for the CCircle class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_CIRCLE_H__3824695A_9BBD_4A48_B09F_99A8E6CFCFDD__INCLUDED_)
- #define AFX_CIRCLE_H__3824695A_9BBD_4A48_B09F_99A8E6CFCFDD__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "Shape.h"
- enum tagToolState //鼠标点击次数
- {Init_State,FirstHit,SecondHit};
- class CCircle : public CShape
- {
- public:
- void Zoom(CDC *pDC,CPoint point);
- void KillMirLine(CDC *pDC);
- void DrawMirLine(CDC *pDC,POINT MirBegPt, POINT MirEndPt);
- void OnMirLBtnDn(CDC *pDC,CPoint point);
- POINT GetMirPt(const POINT& ptBegin, const POINT& ptEnd,POINT ptCur);
- void Mirror(CDC *pDC,CPoint point);
- void Update(CDC *pDC);
- CPoint GetPosEnd();
- CPoint GetPosBegin();
- void SetPosEnd(CPoint point);
- void SetPosBegin(CPoint point);
- CCircle();
- virtual ~CCircle();
- void OnLbuttondown(CDC *pDC,CPoint point);
- void Onmousemove(CDC *pDC,CPoint point);
- int Distance(POINT ptPos1, POINT ptPos2);
- void DrawCircle(HDC hdc,POINT ptCenter,int nRadius);
- bool Select(CDC *pDC,CPoint point);
- bool pick(POINT pt);
- void DrawRect(HDC hdc,POINT m_ptBeginPo,COLORREF m_color = RGB(255,0,0));
- void Move(CDC *pDoc,CPoint point);
- void Delete(CDC *pDC);
- POINT m_FirstMirPt; //镜像后的点
- POINT m_ptBeginPos; // 中心点
- POINT m_ptPrePos; // 末尾点
- tagToolState m_eToolState; //鼠标状态标记
- POINT m_oldpt;
- static int nRadius;
- bool KILLRECT;
- POINT m_pttempbeginpos;
- POINT m_MirBegPt; //镜像直线起点
- POINT m_MirEndPt;
- bool blncircletemp;
- // POINT m_oldpos[8];
- //int nRadius;
- // POINT m_ptFirstPos; // first point
- // POINT m_ptSecondPos; // second point
- };
- #endif // !defined(AFX_CIRCLE_H__3824695A_9BBD_4A48_B09F_99A8E6CFCFDD__INCLUDED_)