BeeLine.cpp
资源名称:CAD2006.rar [点击查看]
上传用户:ckg1000
上传日期:2013-01-26
资源大小:630k
文件大小:1k
源码类别:
CAD
开发平台:
Visual C++
- // BeeLine.cpp: implementation of the CBeeLine class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "CAD2006.h"
- #include "BeeLine.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CBeeLine::CBeeLine()
- {
- }
- CBeeLine::~CBeeLine()
- {
- }
- void CBeeLine::Draw(CDC *pDC)
- {
- /* HPEN hPen = ::CreatePen(m_borderStyle,
- m_borderWidth,m_borderColor^pDC->GetBkColor());
- //将创建的HPEN选入DeviceContext,并把默认HPEN保存到hOldPen
- HPEN hOldPen = (HPEN)pDC->SelectObject(hPen);
- //设置混合模式
- int oldR2 = pDC->SetROP2(R2_XORPEN);
- //以前背景异或方式两次绘制直线
- pDC->MoveTo(m_ptBeginPos.x, m_ptBeginPos.y);
- pDC->LineTo(m_ptOldPos.x, m_ptOldPos.y);
- pDC->MoveTo(m_ptBeginPos.x, m_ptBeginPos.y);
- pDC->LineTo(m_ptEndPos.x, m_ptEndPos.y);
- //恢复默认异或方式
- pDC->SetROP2(oldR2);
- //将默认HPEN返还到DeviceContext
- pDC->SelectObject(hOldPen);
- //删除创建的HPEN
- ::DeleteObject(hPen);*/
- }