⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geopoint.cpp

📁 VC++开发广州市交通运输干线
💻 CPP
字号:
// GeoPoint.cpp: implementation of the CGeoPoint class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "DigitalMap.h"
#include "GeoPoint.h"

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

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

CGeoPoint::CGeoPoint()
{

}

CGeoPoint::CGeoPoint(CGeoPointXY cGeoPtXY,int attriCode)
{
	m_ptXY.X = cGeoPtXY.X;
	m_ptXY.Y = cGeoPtXY.Y;
	m_attriCode = attriCode;
}

CGeoPoint::~CGeoPoint()
{

}

void CGeoPoint::SetPointXY(CGeoPointXY ptXY)	//设置点位置
{
	m_ptXY.X = ptXY.X;
	m_ptXY.Y = ptXY.Y;
}

void CGeoPoint::GetPointXY(CGeoPointXY &ptXY)	//取出点位置
{
	ptXY.X = m_ptXY.X;
	ptXY.Y = m_ptXY.Y;
}

void CGeoPoint::Draw(CDC *pDC,BOOL bDisplay,int nCircle)					//画点
{
	CGeoPointXY cGeoPtXY;
	GetPointXY(cGeoPtXY);
	float x = cGeoPtXY.X;
	float y = cGeoPtXY.Y;
	if(bDisplay==0)//就是擦除图像
		return;//pDC->SetROP2(R2_NOTXORPEN);
	pDC->Ellipse(x-nCircle,y-nCircle,x+nCircle,y+nCircle);
}

⌨️ 快捷键说明

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