forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpie.h
78 lines (64 loc) · 1.83 KB
/
pie.h
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
/*
* pie.h
*
*/
/* not available in SysV
* #include "strings.h"
*/
#include <grass/gis.h>
#include "options.h"
#include "dhist.h"
/*******************************************************************
*
*
* <cell-file name> in mapset <mapset name> <---- the title
*
* ......
* ............
* .................
* .....................
* ........................
* ........................
* ...........*............ <----- the pie
* ........................
* ........................
* ....................
* ................
* ............
* .......
*
* [][][][][][][][][][][][][][][][][][][][] <---- the category
* ---+----+----+----+----+----+----+----+- number legend
* n1 n2 n3 n4 nn
*
* Category values in <tic-mark number units> <--- legend label
*
*
*******************************************************************
*/
float rem(); /* remainder function */
/* normalized coordinates & dimensions of pie-chart components */
/* origin */
#define ORIGIN_X 0.5
#define ORIGIN_Y 0.59
#define BAR_X1 0.13
#define BAR_X2 0.87
#define BAR_Y1 0.17
#define BAR_Y2 0.23
/* radius of pie */
#define RADIUS 0.25
/* height of legend "color-bar" */
#define BAR_HEIGHT BAR_Y2-BAR_Y1
/* minimum distance between numbered tic-marks on legend */
#define XTIC_DIST 40
/* sizes of legend tic-marks */
#define BIG_TIC 0.025
#define SMALL_TIC 0.015
/* y-coordinate of legend label */
#define LABEL 0.03
/* y-coordinate of legend tic-mark numbers */
#define XNUMS_Y 0.09
/* text width and height */
#define TEXT_HEIGHT 0.05
#define TEXT_WIDTH TEXT_HEIGHT*0.5
extern struct units tics[];