|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件 ScaleLegend.h
|
|
|
|
|
|
#pragma once
|
|
|
#include "DrawOperator/pointnamerect.h"
|
|
|
#include "DrawOperator/GroupBase.h"
|
|
|
|
|
|
class AFX_EXT_CLASS CScaleLegend : public CGroupBase
|
|
|
{
|
|
|
public:
|
|
|
CScaleLegend(void);
|
|
|
virtual ~CScaleLegend(void);
|
|
|
void operator=(const CScaleLegend& pt);
|
|
|
|
|
|
public:
|
|
|
virtual CString GetXmlType() { return _T("ScaleLegend"); }
|
|
|
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
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 bool GetRange(CRect8& range);
|
|
|
virtual BOOL IsInRange(CRect8& range);
|
|
|
virtual void ScaleProperty(double sx, double sy);
|
|
|
|
|
|
virtual void ExchangeXY(void);
|
|
|
virtual void ExchangeXY(void* pProjection); //转换到指定投影坐标,CPrljectio* pProjection
|
|
|
|
|
|
|
|
|
//克隆,虚函数
|
|
|
//virtual void Clone(CObjectBase& object) { *this = *((CScaleLegend*)&object);}
|
|
|
|
|
|
virtual BOOL Transform(CXyDC* pDC, float* matrix, BOOL bUndo=FALSE);//matrix length is 6
|
|
|
//显示
|
|
|
virtual void Draw(CXyDC& dc);
|
|
|
|
|
|
public:
|
|
|
//初始化属性列表
|
|
|
|
|
|
|
|
|
public:
|
|
|
CRect8 GetRect(void);
|
|
|
void SetViewMode(DWORD nMode); //设置比例尺风格
|
|
|
DWORD GetViewMode(void);
|
|
|
void SetAlignsH(DWORD nMode); //设置文本水平风格
|
|
|
DWORD GetAlignsH(void);
|
|
|
|
|
|
virtual void Draw(void* pDC, void* pxy);
|
|
|
|
|
|
public:
|
|
|
enum enumStyleFlags
|
|
|
{
|
|
|
styleSimple =0x00001000, //普通式
|
|
|
styleContemporaneity =0x00002000, //现代式
|
|
|
stylePopular =0x00004000, //流行式
|
|
|
styleFashion =0x00008000, //时尚式
|
|
|
styleAll =(styleSimple|styleContemporaneity|stylePopular|styleFashion)
|
|
|
};
|
|
|
|
|
|
double m_dScaleLength; //比例长度,一个刻度代表的实际长度(一般情况一个刻度为1厘米)
|
|
|
double m_dTextScale; //文本系数
|
|
|
double m_dCoefficient; //放大系数
|
|
|
CString m_strUnit; //单位文本
|
|
|
DWORD m_nFlags;
|
|
|
long num;
|
|
|
long m_nSpace; //文本采样间隔
|
|
|
|
|
|
COLORREF m_clr;
|
|
|
|
|
|
};
|