-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMap6.cpp
57 lines (44 loc) · 1.08 KB
/
Map6.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Map6.cpp: implementation of the CMap6 class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "DJQGeoExe.h"
#include "Map6.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMap6::CMap6()
{
}
CMap6::~CMap6()
{
int size = geoLayers.GetSize();
for(int i=0;i<size;i++)
delete geoLayers.ElementAt(i);
}
void CMap6::addLayer(CGeoLayer6 *layer)
{
this->geoLayers.Add(layer);
}
void CMap6::Draw(CDC *pDC)
{
clipMap(clipRect);
CPen pen1(PS_SOLID, 1, RGB(0,0,255));
CPen *oldPen = pDC->SelectObject(&pen1);
pDC->Rectangle(clipRect);
pDC->SelectObject(oldPen);
int size = geoLayers.GetSize() ;
for(int i=0;i<size;i++)
geoLayers.GetAt(i)->Draw(pDC);
}
void CMap6::clipMap(CRect clipRect)
{
int size = geoLayers.GetSize() ;
for(int i=0;i<size;i++)
geoLayers.GetAt(i)->clipLayer(clipRect);
}