Diff of /trunk/src/josm_elemstyles.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 14 by achadwick, Mon Dec 15 14:17:29 2008 UTC revision 15 by harbaum, Tue Dec 16 17:00:20 2008 UTC
# Line 29  float zoom_to_scaledn(const float zoom); Line 29  float zoom_to_scaledn(const float zoom);
29  typedef enum {  typedef enum {
30    ES_TYPE_NONE = 0,    ES_TYPE_NONE = 0,
31    ES_TYPE_LINE,    ES_TYPE_LINE,
32    ES_TYPE_AREA    ES_TYPE_AREA,
33      ES_TYPE_LINE_MOD
34  } elemstyle_type_t;  } elemstyle_type_t;
35    
36  typedef gulong elemstyle_color_t;  typedef gulong elemstyle_color_t;
# Line 60  typedef struct { Line 61  typedef struct {
61    float zoom_max;   // XXX probably belongs in elemstyle_s    float zoom_max;   // XXX probably belongs in elemstyle_s
62  } elemstyle_line_t;  } elemstyle_line_t;
63    
64    /* attribute modifiers */
65    typedef enum {
66      ES_MOD_NONE = 0,  // don't change attribute
67      ES_MOD_ADD,       // add constant value
68      ES_MOD_SUB,       // subtract constant value
69      ES_MOD_PERCENT    // scale by x percent
70    } elemstyle_mod_mode_t;
71    
72    /* a width with modifier */
73    typedef struct {
74      elemstyle_mod_mode_t mod;
75      gint width;
76    } elemstyle_width_mod_t;
77    
78    
79    typedef struct {
80      elemstyle_width_mod_t line, bg;
81    } elemstyle_line_mod_t;
82    
83  typedef struct {  typedef struct {
84    elemstyle_color_t color;    elemstyle_color_t color;
85    float zoom_max;   // XXX probably belongs in elemstyle_s    float zoom_max;   // XXX probably belongs in elemstyle_s
# Line 80  typedef struct elemstyle_s { Line 100  typedef struct elemstyle_s {
100    elemstyle_type_t type;    elemstyle_type_t type;
101    
102    union {    union {
103        elemstyle_line_mod_t *line_mod;
104      elemstyle_line_t *line;      elemstyle_line_t *line;
105      elemstyle_area_t *area;      elemstyle_area_t *area;
106    };    };

Legend:
Removed from v.14  
changed lines
  Added in v.15