grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

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
22typedef 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 */
30typedef struct
31{
32 int type; /* S_LINE or S_ARC */
33 union
34 {
35 struct
36 {
38 double *x, *y;
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 */
49typedef 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 */
58typedef struct
59{
60 int type; /* S_STRING or S_POLYGON */
63 int count, alloc; /* number of rings */
64 SYMBCHAIN **chain; /* array strings */
65} SYMBPART;
66
67typedef 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
static void line(double m[2][3], double x0, double y0, double x1, double y1)
Definition: icon.c:20
int count
static const uint32 a2
Definition: lrand48.c:38
float g
Definition: named_colr.c:8
double r
Definition: r_raster.c:39
int alloc
Definition: symbol.h:51
SYMBEL ** elem
Definition: symbol.h:52
int salloc
Definition: symbol.h:53
double * sx
Definition: symbol.h:54
int b
Definition: symbol.h:25
double fb
Definition: symbol.h:26
int color
Definition: symbol.h:24
Definition: symbol.h:31
int type
Definition: symbol.h:32
double * x
Definition: symbol.h:38
int alloc
Definition: symbol.h:37
double a1
Definition: symbol.h:43
int clock
Definition: symbol.h:42
Definition: symbol.h:68
double scale
Definition: symbol.h:69
double xscale
Definition: symbol.h:71
double yscale
Definition: symbol.h:70
int alloc
Definition: symbol.h:72
SYMBPART ** part
Definition: symbol.h:73
int alloc
Definition: symbol.h:63
SYMBCHAIN ** chain
Definition: symbol.h:64
SYMBCOLOR fcolor
Definition: symbol.h:62
SYMBCOLOR color
Definition: symbol.h:61
int type
Definition: symbol.h:60
#define x