#pragma once #include "dfpluginbase.h" #include "formatreaderbase.h" namespace NPluginFormat { class CPluginFormatZGF : public CPluginFormatBase { public: CPluginFormatZGF(void); virtual ~CPluginFormatZGF(void); //在该插件中仅需要调用该函数就可将其转换为双狐格式 virtual int ReadFile(const char* strFilePathName, int nFormatType); //初始化信息,如调用对话框设置读取参数及内存申请等 virtual int Initialize(const char* strFilePathName); CString m_strPath; //完成实际的格式转换工作 class CZgf : public CFormatReaderBase { public: CZgf(void); virtual ~CZgf(void); int Read(const char* strFileName); int OpenNewFile(CString strFileName); CString GetType(int nType); long GetColor(__int64 nZgfColor); CString m_strPath; CString m_strCurrentFileName; CString m_strLayer; double xmin = 0, xmax = 0, ymin = 0, ymax = 0; //图件范围 double ox = 0, oy = 0; //原点坐标 double sx = 0, sy = 0; //比例因子 void ToRealCoordinate(double& x, double& y); double ToRealWidth(double w); COLORREF ** m_zgfColor; int m_zgfNum; void ClearColorArray(void); long GetArrayColor(int nIndex); }; }; };