|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "formatdc.h"
|
|
|
|
|
|
#include "mapgisfile.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace NFormatWriter
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class CMapGisDC :
|
|
|
|
|
|
public CFormatDC
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CMapGisDC(void);
|
|
|
|
|
|
virtual ~CMapGisDC(void);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void SetPixel(double x, double y, COLORREF col);
|
|
|
|
|
|
virtual void Draw(CText& text, CCurveEx& curve);
|
|
|
|
|
|
virtual void PaintRgn(CCurveEx& curve);
|
|
|
|
|
|
virtual void Draw(CMesh &mesh);
|
|
|
|
|
|
virtual void Draw(CImageInsert& image);
|
|
|
|
|
|
virtual void FillSolidRect(CRect8& rect, COLORREF color);
|
|
|
|
|
|
virtual void PolyLine(CPointList& dp);
|
|
|
|
|
|
virtual void Draw(CInsertDraw& m_insert);
|
|
|
|
|
|
virtual void Draw(CInsertOld& m_insert);
|
|
|
|
|
|
|
|
|
|
|
|
void OutLine(CFile& fw, CPointList& dp, long nID);
|
|
|
|
|
|
void ReadMapGisColorIndex(void);
|
|
|
|
|
|
|
|
|
|
|
|
virtual void SetFile(CFile* pFile);
|
|
|
|
|
|
virtual void Initial(void);
|
|
|
|
|
|
virtual int OutFront(void);
|
|
|
|
|
|
virtual int OutEnd(void);
|
|
|
|
|
|
|
|
|
|
|
|
void operator=(CMapGisDC& dc);
|
|
|
|
|
|
void SetFileName(CString strFileName);
|
|
|
|
|
|
|
|
|
|
|
|
void OutColorLib(void);
|
|
|
|
|
|
void Clear(void);
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
CString m_strFileName; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>γ<EFBFBD><CEB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>*.wat<61><74><EFBFBD>㣩<EFBFBD><E3A3A9>*.wal<61><6C><EFBFBD>ߣ<EFBFBD><DFA3><EFBFBD>*.wap<61><70><EFBFBD>棩
|
|
|
|
|
|
CFile* m_pFileWat; //<2F><>
|
|
|
|
|
|
CFile* m_pFileWal; //<2F><>
|
|
|
|
|
|
CFile* m_pFileWap; //<2F><>
|
|
|
|
|
|
int m_nFileCreateMode; //0=wat, 1=wal, 2=wap, -1=ȫ<><C8AB>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
CFile* CreateFile(CString strFileName);
|
|
|
|
|
|
long m_nTotalCurveCount;
|
|
|
|
|
|
long m_nTotalPolygonCount;
|
|
|
|
|
|
long m_nTotalPointCount;
|
|
|
|
|
|
static int _compare_MapGis_ArrayColor(const void *d1,const void *d2);
|
|
|
|
|
|
|
|
|
|
|
|
int GetColorIndex(COLORREF col);
|
|
|
|
|
|
int WritePColor(LPCTSTR lpszColorFile);
|
|
|
|
|
|
void WriteLine(CFile &fw, CString str);
|
|
|
|
|
|
void WriteReturn(CFile &fw);
|
|
|
|
|
|
|
|
|
|
|
|
CMap<DWORD, DWORD, int, int> m_arrColorWrite; //Ϊ<><CEAA>дPColor.lib<69>ļ<EFBFBD>
|
|
|
|
|
|
CMGColorLib m_mgColorLib;
|
|
|
|
|
|
|
|
|
|
|
|
class CPolyItem
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CPolyItem(){nID=0; area=0; length=0; nColIndex=1;}
|
|
|
|
|
|
long nID;
|
|
|
|
|
|
double area;
|
|
|
|
|
|
double length;
|
|
|
|
|
|
int nColIndex;
|
|
|
|
|
|
};
|
|
|
|
|
|
CArray<CPolyItem, CPolyItem> m_arrPoly;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
};
|