File: vector.h

package info (click to toggle)
grass 6.0.2-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 40,044 kB
  • ctags: 31,303
  • sloc: ansic: 321,125; tcl: 25,676; sh: 11,176; cpp: 10,098; makefile: 5,025; fortran: 1,846; yacc: 493; lex: 462; perl: 133; sed: 1
file content (93 lines) | stat: -rw-r--r-- 2,721 bytes parent folder | download | duplicates (2)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/** Modified by: Janne Soimasuo August 1994 line_cat added **/
/** Modified by: Radim Blazek Jan 2000 acolor, label added **/
/** Modified by: Morten Hulden Mar 2004 cols added to vector **/
#include "clr.h"
#define PI 3.14159265   
/* #define MAXVECTORS 20 */

/* layer type */
#define VPOINTS 0
#define VLINES 1
#define VAREAS 2

/* line justification */
#define LINE_REF_CENTER 0
#define LINE_REF_LEFT 1
#define LINE_REF_RIGHT 2

/* draw line */
#define LINE_DRAW_LINE 1
#define LINE_DRAW_HIGHLITE 2

/* construct_path() */
#define START_PATH  0 
#define ADD_TO_PATH 1
#define CLOSE_PATH  2
#define WHOLE_PATH  3

typedef struct {
    /* All types */
    int type; /* layer type: VPOINTS, VLINES, VAREAS */
    char *name;
    char *mapset;
    char masked;
    char *label; /* label in legend */
    int lpos;  /* position in legend: -1 not specified, 0 do not display, > 0 position in legend */

    double width; /* width of line, boundary or icon outline */
    PSCOLOR color; /* color of line, boundary or icon outline */

    int field; /* category field */
    char *cats;  /* list of categories */
    /* struct cat_list *clist; */  /* list of categories */
    char *where; /* SQL where condition (without WHERE key word) */
    
    /* Lines */
    double cwidth; /* category width */
    double offset; /* offset */
    double coffset; /* category offset */
    int ref;   /* justification */
    char *linestyle; /* line or boundary style */
    char *setdash;   /* ? */
    double hwidth;   /* line or boundary highlight line width */ 
    PSCOLOR  hcolor;

    /* Areas */
    char *pat;   /* name of eps file for pattern */
    double scale; /* scale of pattern */
    double pwidth; /* pattern width */

    /* Points */
    double size;  /* icon size */
    double rotate;   /* rotation, supported only for eps */
    char *symbol;   /* symbol name */
    char *symbol_ps;   /* symbol name in PS */
    char *epspre;   /* first part of EPS file name */
    char *epssuf;   /* second part of EPS file name */
    int  epstype;  /* 0 - no eps, 1 - common eps, 2 - eps for each category */

    /* Points + Line */
    int ltype;  /* point/centroid or line/boundary */

    /* Points + Areas */
    PSCOLOR fcolor; /* fill color */

} LAYER;
    
struct vector {
    int cur; /* currently processed vector */
    int count; /* number of recorded layers */
    int alloc; /* allocated space */
    double x, y; /* legend position */
    int fontsize; /* legend font size */
    char *font;    /* legend font */
    double width;  /* width of legend symbols */
    int cols; /* number of colums  */
    LAYER *layer;
} ;

#ifdef MAIN
    struct vector vector;
#else
    extern struct vector vector;
#endif