geoline.cpp

来自「软件参考Windows操作系统下的画图程序」· C++ 代码 · 共 37 行

CPP
37
字号
// GeoLine.cpp: implementation of the GeoLine class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Drawing.h"
#include "GeoLine.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

GeoLine::GeoLine()
{

}

GeoLine::~GeoLine()
{

}

void GeoLine::Draw(CDC &dc)
{
	CPen pen(PS_SOLID, m_nWidth, m_color);
	CPen *oldpen = dc.SelectObject(&pen);
	dc.MoveTo(m_pPoint1);
	dc.LineTo(m_pPoint2);
	dc.SelectObject(oldpen);	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?