X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=labeller.h;h=4fe0d922b12ff5cf57394368244486374dbe5b56;hb=63549401134446b1ffedc1e128ba9e4e045451fd;hp=d82e830fee1333433ecb2334872b2090cb4cb8f0;hpb=c4f484177d9017fe50a78d535020394699e1a360;p=leo.git diff --git a/labeller.h b/labeller.h index d82e830..4fe0d92 100644 --- a/labeller.h +++ b/labeller.h @@ -1,6 +1,16 @@ #ifndef _LEO_LABELLER_H #define _LEO_LABELLER_H +enum verbosity +{ + VERBOSITY_NONE, + VERBOSITY_GENERAL, + VERBOSITY_POPULATION, + VERBOSITY_INDIVIDUAL, + VERBOSITY_PLACEMENT, + VERBOSITY_ALL, +}; + enum edge_dir { DIR_INVALID, @@ -31,6 +41,8 @@ struct variant { int width; int height; + int offset_x; + int offset_y; bool *bitmap; }; @@ -61,7 +73,7 @@ struct request_segment double y1; double x2; double y2; - double angle; + double slope; struct symbol *label; z_index_t zindex; }; @@ -143,29 +155,28 @@ struct placement double x; double y; int variant_used; + int ind; bool processed; // FIXME: Replace with clist? - struct placement_link *map_links; + struct map_placement *map_links; struct individual *individual; }; -struct placement_link -{ - struct map_placement *mp; - struct placement_link *next; -}; - struct map_placement { struct placement *placement; - struct map_placement *next; - struct map_placement *prev; + struct map_part *part; + struct map_placement *next_in_map; + struct map_placement *prev_in_map; + struct map_placement *next_in_placement; + struct map_placement *prev_in_placement; }; struct map_part { // FIXME: Replace with clist? struct map_placement *placement; + int ind; }; struct individual @@ -176,6 +187,8 @@ struct individual }; void labeller_init(void); +void labeller_cleanup(void); + void labeller_add_point(struct symbol *sym, struct osm_object *object, z_index_t zindex); void labeller_add_line(struct symbol *sym, z_index_t zindex); void labeller_label(void);