GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)-3d2c704037
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
SYMBPART
Definition:
symbol.h:58
symbol.h
SYMBEL::y
double * y
Definition:
symbol.h:38
SYMBCOLOR::color
int color
Definition:
symbol.h:24
SYMBEL::y
double y
Definition:
symbol.h:43
SYMBPART::chain
SYMBCHAIN ** chain
Definition:
symbol.h:64
SYMBCOLOR
Definition:
symbol.h:22
SYMBCOLOR::fr
double fr
Definition:
symbol.h:26
SYMBEL::count
int count
Definition:
symbol.h:37
SYMBOL::scale
double scale
Definition:
symbol.h:69
SYMBOL
Definition:
symbol.h:67
SYMBPART::count
int count
Definition:
symbol.h:63
SYMBOL::yscale
double yscale
Definition:
symbol.h:70
SYMBOL::part
SYMBPART ** part
Definition:
symbol.h:73
x
#define x
b
double b
Definition:
r_raster.c:39
SYMBPART::fcolor
SYMBCOLOR fcolor
Definition:
symbol.h:62
SYMBEL::type
int type
Definition:
symbol.h:32
SYMBPART::color
SYMBCOLOR color
Definition:
symbol.h:61
g
float g
Definition:
named_colr.c:8
SYMBEL::clock
int clock
Definition:
symbol.h:42
SYMBOL::count
int count
Definition:
symbol.h:72
SYMBCHAIN::sy
double * sy
Definition:
symbol.h:54
SYMBCHAIN::count
int count
Definition:
symbol.h:51
SYMBPART::type
int type
Definition:
symbol.h:60
SYMBCHAIN::scount
int scount
Definition:
symbol.h:53
SYMBCOLOR::r
int r
Definition:
symbol.h:25
SYMBCHAIN::elem
SYMBEL ** elem
Definition:
symbol.h:52
SYMBCHAIN
Definition:
symbol.h:49
SYMBOL::xscale
double xscale
Definition:
symbol.h:71
r
double r
Definition:
r_raster.c:39
SYMBEL
Definition:
symbol.h:30
include
grass
symbol.h
Generated on Tue Feb 14 2023 05:56:02 for GRASS GIS 8 Programmer's Manual by
1.8.13