|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件 Proportion.h
|
|
|
//主要功能:
|
|
|
//
|
|
|
//程序编写: 2005-12-07
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#pragma once
|
|
|
#include ".\pointnamerect.h"
|
|
|
|
|
|
class AFX_EXT_CLASS CProportion : public CPointNameRect
|
|
|
{
|
|
|
public:
|
|
|
CProportion(void);
|
|
|
virtual ~CProportion(void);
|
|
|
|
|
|
enum enumStyleFlags
|
|
|
{
|
|
|
styleSimple =0x00001000, //普通式
|
|
|
styleContemporaneity =0x00002000, //现代式
|
|
|
stylePopular =0x00004000, //流行式
|
|
|
styleAll =(styleSimple|styleContemporaneity|stylePopular)
|
|
|
};
|
|
|
|
|
|
double m_dScaleLength; //比例长度,一个刻度代表的实际长度(一般情况一个刻度为1厘米)
|
|
|
double m_dTextScale; //文本系数
|
|
|
double m_dCoefficient; //放大系数
|
|
|
double m_dScaleHeight; //比例尺高度(老格式没有写入)
|
|
|
CString m_strUnit; //单位文本
|
|
|
double m_dSpace = 1; // 文本间隔
|
|
|
DWORD m_nFlags;
|
|
|
long num;
|
|
|
|
|
|
void Serialize(CArchive& ar, const short &ver) override;
|
|
|
virtual int Read(CFile& fr, const short& ver);
|
|
|
virtual void Write(CFile& fw, const short& ver);
|
|
|
|
|
|
virtual void WriteDML(CFile& fw, const short& ver, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver);
|
|
|
|
|
|
virtual void WritePCG(CFile& fw, const short& ver, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver);
|
|
|
|
|
|
virtual void WritePCG2(CFile& fw, const short& ver, int nBaseTabNum);
|
|
|
virtual int ReadPCG2(CFile &fr, const short &ver);
|
|
|
|
|
|
virtual bool GetRange(CRect8& range);
|
|
|
virtual int IsInRange(CRect8& range);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
|
|
|
virtual void ExchangeXY(void);
|
|
|
virtual void ExchangeXY(void* pProjection); //转换到指定投影坐标,CPrljectio* pProjection
|
|
|
|
|
|
void operator=(const CProportion& pt);
|
|
|
|
|
|
CRect8 GetRect(void);
|
|
|
void SetViewMode(DWORD nMode); //设置比例尺风格
|
|
|
DWORD GetViewMode(void);
|
|
|
void SetAlignsH(DWORD nMode); //设置文本水平风格
|
|
|
DWORD GetAlignsH(void);
|
|
|
void SetCoefficient(double scale); //设置比例尺放大系数
|
|
|
double GetCoefficient();
|
|
|
|
|
|
COLORREF color;
|
|
|
|
|
|
public:
|
|
|
virtual int ReadPCG(void *pxp, const short &ver);
|
|
|
virtual int ReadPCG2(void *pxp, const short &ver);
|
|
|
};
|