GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-602118adcc
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
int
color
;
/* reset default */
24
int
r
,
g
,
b
;
25
double
fr, fg,
fb
;
26
}
SYMBCOLOR
;
27
28
/* symbol element: line or arc */
29
typedef
struct
{
30
int
type
;
/* S_LINE or S_ARC */
31
union
{
32
struct
{
33
int
count
,
alloc
;
34
double
*
x
, *y;
35
} line;
36
struct
{
37
int
clock
;
/* 1 clockwise, 0 counter clockwise */
38
double
x
, y,
r
,
a1
, a2;
39
} arc;
40
} coor;
41
}
SYMBEL
;
42
43
/* string of elements */
44
typedef
struct
{
45
int
count
,
alloc
;
/* number of elements */
46
SYMBEL
**
elem
;
/* array of elements */
47
int
scount,
salloc
;
/* number of points in stroked version */
48
double
*
sx
, *sy;
/* coordinates in stroked version */
49
}
SYMBCHAIN
;
50
51
/* part */
52
typedef
struct
{
53
int
type
;
/* S_STRING or S_POLYGON */
54
SYMBCOLOR
color
;
55
SYMBCOLOR
fcolor
;
56
int
count
,
alloc
;
/* number of rings */
57
SYMBCHAIN
**
chain
;
/* array strings */
58
}
SYMBPART
;
59
60
typedef
struct
{
61
double
scale
;
/* to get symbol of size 1, each vertex must be multiplied by
62
this scale */
63
double
yscale
;
/* scale in x dimension */
64
double
xscale
;
/* scale in y dimension */
65
int
count
,
alloc
;
/* number of parts */
66
SYMBPART
**
part
;
/* objects ( parts ) */
67
}
SYMBOL
;
68
69
#include <
grass/defs/symbol.h
>
70
71
#endif
symbol.h
count
int count
g
float g
Definition:
named_colr.c:7
r
double r
Definition:
r_raster.c:39
SYMBCHAIN
Definition:
symbol.h:44
SYMBCHAIN::alloc
int alloc
Definition:
symbol.h:45
SYMBCHAIN::elem
SYMBEL ** elem
Definition:
symbol.h:46
SYMBCHAIN::salloc
int salloc
Definition:
symbol.h:47
SYMBCHAIN::sx
double * sx
Definition:
symbol.h:48
SYMBCOLOR
Definition:
symbol.h:22
SYMBCOLOR::b
int b
Definition:
symbol.h:24
SYMBCOLOR::fb
double fb
Definition:
symbol.h:25
SYMBCOLOR::color
int color
Definition:
symbol.h:23
SYMBEL
Definition:
symbol.h:29
SYMBEL::type
int type
Definition:
symbol.h:30
SYMBEL::x
double * x
Definition:
symbol.h:34
SYMBEL::alloc
int alloc
Definition:
symbol.h:33
SYMBEL::a1
double a1
Definition:
symbol.h:38
SYMBEL::clock
int clock
Definition:
symbol.h:37
SYMBOL
Definition:
symbol.h:60
SYMBOL::scale
double scale
Definition:
symbol.h:61
SYMBOL::xscale
double xscale
Definition:
symbol.h:64
SYMBOL::yscale
double yscale
Definition:
symbol.h:63
SYMBOL::alloc
int alloc
Definition:
symbol.h:65
SYMBOL::part
SYMBPART ** part
Definition:
symbol.h:66
SYMBPART
Definition:
symbol.h:52
SYMBPART::alloc
int alloc
Definition:
symbol.h:56
SYMBPART::chain
SYMBCHAIN ** chain
Definition:
symbol.h:57
SYMBPART::fcolor
SYMBCOLOR fcolor
Definition:
symbol.h:55
SYMBPART::color
SYMBCOLOR color
Definition:
symbol.h:54
SYMBPART::type
int type
Definition:
symbol.h:53
x
#define x
include
grass
symbol.h
Generated on Mon Nov 18 2024 06:59:56 for GRASS GIS 8 Programmer's Manual by
1.9.1