legendParamater.cpp
1.4 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
#include "legendParamater.h"
namespace DmapCore_30
{
legendParamater::legendParamater(/* args */)
{
index = 0;
rowspacing = 15;
size_x = 30;
size_y = 15;
pixYIndex = 10;
pixXIndex = 20;
fontSize = 10;
current_Col_Index = 0;
max_pixXIndex = 10;
max_pixYIndex = 10;
}
legendParamater::~legendParamater()
{
}
bool legendParamater::next(char * title)
{
if( row_maxsize >0 && index/row_maxsize > current_Col_Index)
{
current_Col_Index ++;
pixXIndex = 10 + (current_Col_Index *100);
pixYIndex = 10;
if(pixXIndex> max_pixXIndex)
{
max_pixXIndex = pixXIndex;
}
}
if(title == nullptr)
{
index ++;
provTitle ="";
pixYIndex += (rowspacing + size_y);
if(pixYIndex> max_pixYIndex)
{
max_pixYIndex = pixYIndex;
}
return true;
}
string str_title = title;
if(str_title != provTitle)
{
index ++;
provTitle =str_title;
pixYIndex += (rowspacing + size_y);
if(pixYIndex> max_pixYIndex)
{
max_pixYIndex = pixYIndex;
}
return true;
}
return true;
}
}