Ignore:
Timestamp:
Sep 29, 2009, 1:37:06 AM (15 years ago)
Author:
marisn
Message:

Move OGSF to new vector feature styling approach

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/include/gstypes.h

    r32526 r39323  
    163163   usually be stored as 2d, since they may be draped on multiple
    164164   surfaces & Z will vary depending upon surface. */
     165
     166/* Struct for vector feature displaying attributes */
     167typedef struct g_vect_style
     168{
     169    int color;          /* Line color */
     170    int symbol;         /* Point symbol/line type */
     171    float size;         /* Symbol size. Unset for lines. */
     172    int width;          /* Line width. Also used for lines forming symbols i.e. X */
     173    /*TODO:fill;         Area fill pattern */
     174    /*TODO:falpha;       Area fill transparency */
     175    /*TODO:lalpha;       Line/boundary/point transparency */
     176    /*TODO:struct *orientation;  Symbol orientation */
     177    struct g_vect_style *next; /* Point to next gvstyle struct if single point has multiple styles. In such case feature with next style should be shifted.  */
     178} gvstyle;
     179
     180/* Line instance */
    165181typedef struct g_line
    166182{
     
    170186    Point3 *p3;
    171187    Point2 *p2;
     188   
     189    struct line_cats *cats;     /* Store information about all layers/cats for thematic display */
     190    gvstyle *style;     /* Line instance look&feel */
     191    signed char highlighted; /* >0 Feature is highlighted */
     192   
    172193    struct g_line *next;
    173194} geoline;
    174195
     196/* Vector line layer */
    175197typedef struct g_vect
    176198{
     
    180202    int flat_val;
    181203    int n_surfs;
    182     int color, width;
    183204    char *filename;
    184205    float x_trans, y_trans, z_trans;
     
    189210    struct g_vect *next;
    190211    void *clientdata;
     212
     213    int thematic_layer;         /* Layer number to use for thematic mapping. <0 == no thematic mapping;
     214                                    0 == thematic mapping is unset but initialized;
     215                                    >0 use specified layer */
     216    gvstyle *style;     /* Vector default look&feel */
     217    gvstyle *hstyle;    /* IMHO highlight should be per layer basis. */
    191218} geovect;
    192219
    193 /* ACS_MODIFY one line site_attr ********************************************** */
    194 #define GPT_MAX_ATTR 8
    195 
     220/* Point instance */
    196221typedef struct g_point
    197222{
    198223    int dims;
    199224    Point3 p3;
    200     float fattr;                /* may want to make these pointers or arrays for mult atts */
    201     int iattr;
    202     char *cattr;
    203 
    204     /* ACS_MODIFY_BEGIN site_attr ************************************************* */
    205     int cat;
    206     int color[GPT_MAX_ATTR];
    207     float size[GPT_MAX_ATTR];
    208     int marker[GPT_MAX_ATTR];
    209     /* ACS_MODIFY_END site_attr *************************************************** */
    210 
    211     /* ACS_MODIFY_BEGIN highlight ************************************************* */
    212     int highlight_color;
    213     int highlight_size;
    214     int highlight_marker;
    215 
    216     int highlight_color_value;
    217     float highlight_size_value;
    218     int highlight_marker_value;
    219     /* ACS_MODIFY_END highlight *************************************************** */
     225   
     226    struct line_cats *cats;     /* Store information about all layers/cats for thematic display */
     227    gvstyle *style;
     228    signed char highlighted; /* >0 Feature is highlighted */
    220229
    221230    struct g_point *next;
    222231} geopoint;
    223232
     233/* Point layer */
    224234typedef struct g_site
    225235{
     
    227237    int drape_surf_id[MAX_SURFS];       /* ditto */
    228238    int n_surfs, n_sites;
    229     int color, width, marker, use_z, use_mem;
    230     int has_z, has_att;         /* set when file loaded */
    231     int attr_mode;              /* ST_ATT_COLOR, ST_ATT_MARKER, ST_ATT_SIZE, ST_ATT_NONE */
    232 
    233     /* ACS_MODIFY OneLine site_attr *********************************************** */
    234     int use_attr[GPT_MAX_ATTR]; /* ST_ATT_COLOR, ST_ATT_MARKER, ST_ATT_SIZE, ST_ATT_NONE, for multiple attr's */
     239    int use_z, use_mem;
     240    int has_z;          /* set when file loaded */
    235241
    236242    char *filename;
    237243    transform attr_trans;
    238     float size;
    239244    float x_trans, y_trans, z_trans;
    240245    geopoint *points;
     
    242247    struct g_site *next;
    243248    void *clientdata;
     249   
     250    int thematic_layer; /* Layer number to use for thematic mapping. */
     251    gvstyle *style;     /* Vector default look&feel */
     252    gvstyle *hstyle;    /* IMHO highlight should be per layer basis. */
    244253} geosite;
    245254
Note: See TracChangeset for help on using the changeset viewer.