GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)-5c00b4e944
symbol.h
Go to the documentation of this file.
1
#ifndef GRASS_SYMBOL_H
2
#define GRASS_SYMBOL_H
3
4
/* definitions and structures */
5
6
/* Warning : structure is not exactly the same as format. */
7
8
#define S_NONE 0
/* no object (used for reading) */
9
10
/* elements */
11
#define S_LINE 1
/* line */
12
#define S_ARC 2
/* arc */
13
14
/* parts */
15
#define S_STRING 1
16
#define S_POLYGON 2
17
18
#define S_COL_DEFAULT 1
/* default color */
19
#define S_COL_NONE 2
/* no color */
20
#define S_COL_DEFINED 3
/* color defined in symbol file */
21
22
typedef
struct
23
{
24
int
color
;
/* reset default */
25
int
r
,
g
,
b
;
26
double
fr, fg,
fb
;
27
}
SYMBCOLOR
;
28
29
/* symbol element: line or arc */
30
typedef
struct
31
{
32
int
type
;
/* S_LINE or S_ARC */
33
union
34
{
35
struct
36
{
37
int
count
,
alloc
;
38
double
*
x
, *y;
39
} line;
40
struct
41
{
42
int
clock
;
/* 1 clockwise, 0 counter clockwise */
43
double
x
, y,
r
,
a1
, a2;
44
} arc;
45
} coor;
46
}
SYMBEL
;
47
48
/* string of elements */
49
typedef
struct
50
{
51
int
count
,
alloc
;
/* number of elements */
52
SYMBEL
**
elem
;
/* array of elements */
53
int
scount,
salloc
;
/* number of points in stroked version */
54
double
*
sx
, *sy;
/* coordinates in stroked version */
55
}
SYMBCHAIN
;
56
57
/* part */
58
typedef
struct
59
{
60
int
type
;
/* S_STRING or S_POLYGON */
61
SYMBCOLOR
color
;
62
SYMBCOLOR
fcolor
;
63
int
count
,
alloc
;
/* number of rings */
64
SYMBCHAIN
**
chain
;
/* array strings */
65
}
SYMBPART
;
66
67
typedef
struct
68
{
69
double
scale
;
/* to get symbol of size 1, each vertex must be multiplied by this scale */
70
double
yscale
;
/* scale in x dimension */
71
double
xscale
;
/* scale in y dimension */
72
int
count
,
alloc
;
/* numer of parts */
73
SYMBPART
**
part
;
/* objects ( parts ) */
74
}
SYMBOL
;
75
76
#include <
grass/defs/symbol.h
>
77
78
#endif
symbol.h
count
int count
g
float g
Definition:
named_colr.c:8
r
double r
Definition:
r_raster.c:39
SYMBCHAIN
Definition:
symbol.h:50
SYMBCHAIN::alloc
int alloc
Definition:
symbol.h:51
SYMBCHAIN::elem
SYMBEL ** elem
Definition:
symbol.h:52
SYMBCHAIN::salloc
int salloc
Definition:
symbol.h:53
SYMBCHAIN::sx
double * sx
Definition:
symbol.h:54
SYMBCOLOR
Definition:
symbol.h:23
SYMBCOLOR::b
int b
Definition:
symbol.h:25
SYMBCOLOR::fb
double fb
Definition:
symbol.h:26
SYMBCOLOR::color
int color
Definition:
symbol.h:24
SYMBEL
Definition:
symbol.h:31
SYMBEL::type
int type
Definition:
symbol.h:32
SYMBEL::x
double * x
Definition:
symbol.h:38
SYMBEL::alloc
int alloc
Definition:
symbol.h:37
SYMBEL::a1
double a1
Definition:
symbol.h:43
SYMBEL::clock
int clock
Definition:
symbol.h:42
SYMBOL
Definition:
symbol.h:68
SYMBOL::scale
double scale
Definition:
symbol.h:69
SYMBOL::xscale
double xscale
Definition:
symbol.h:71
SYMBOL::yscale
double yscale
Definition:
symbol.h:70
SYMBOL::alloc
int alloc
Definition:
symbol.h:72
SYMBOL::part
SYMBPART ** part
Definition:
symbol.h:73
SYMBPART
Definition:
symbol.h:59
SYMBPART::alloc
int alloc
Definition:
symbol.h:63
SYMBPART::chain
SYMBCHAIN ** chain
Definition:
symbol.h:64
SYMBPART::fcolor
SYMBCOLOR fcolor
Definition:
symbol.h:62
SYMBPART::color
SYMBCOLOR color
Definition:
symbol.h:61
SYMBPART::type
int type
Definition:
symbol.h:60
x
#define x
include
grass
symbol.h
Generated on Mon May 29 2023 05:57:13 for GRASS GIS 8 Programmer's Manual by
1.9.1