dmpsymbol.h
2.2 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/**************************************************************************
* file: dmpsymbol.h
* Author: wanzhongping
* Date: 2021-07-04 15:11:06
* Email: zhongpingw@chinadci.com
* copyright: 广州城市信息研究所有限公司
***************************************************************************/
#ifndef __dmpsymbol_h__
#define __dmpsymbol_h__
#include <vector>
#include "dmap_core.h"
#include "dmpsymbol.h"
#include "dmpwkbtypes.h"
#include "dmprendercontext.h"
class DmpFeature;
class DmpFeatureRenderer;
class DmpSymbolLayer;
typedef std::vector<DmpSymbolLayer*> DmpSymbolLayerList;
class CORE_EXPORT DmpSymbol
{
//友元类
friend class DmpFeatureRenderer;
public:
/**
* Type of the symbol
*/
enum SymbolType
{
Marker, //!< 点标记符号
Line, //!< 线条符合
Fill, //!< 填充符号
Hybrid //!< 混合符号
};
public:
static DmpSymbol* DefaultSymbol(DmpWkbTypes::GeometryType geomType);
void RenderFeature( const DmpFeature &feature, DmpRenderContext &context, int layer = -1);
void StartRender(DmpRenderContext &context);
void StopRender(DmpRenderContext &context);
/**
* 指定图层位置(index)插入一个新符号.
* \param index 应添加图层的索引
* \param layer 要添加的符号图层
* \returns TRUE 符号图层添加成功, FALSE 符号图层添加失败
*/
bool insertSymbolLayer( int index, DmpSymbolLayer *layer );
/**
* 在当前符号图层列表的末尾追加符号图层.
* \param layer 要添加的符号图层
* \returns TRUE 符号图层添加成功, FALSE 符号图层添加失败
*/
bool appendSymbolLayer( DmpSymbolLayer *layer);
/**
* 删除和删除指定索引处的符号图层。
*/
bool deleteSymbolLayer( int index );
protected:
DmpSymbolLayerList layers_;
};
class CORE_EXPORT DmpMarkerSymbol : public DmpSymbol
{
};
class CORE_EXPORT DmpLineSymbol : public DmpSymbol
{
};
class CORE_EXPORT DmpFillSymbol : public DmpSymbol
{
};
#endif //__dmpsymbol_h__