X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=labeller.c;h=c386574556d50d638816518ea330ed7fcb27852f;hb=refs%2Fheads%2Flabelling;hp=71c0f5538c56b73499192d40d7967b7e3b89b118;hpb=4c2fd40afce87812f72e1dc6b00606fc9e42a43b;p=leo.git diff --git a/labeller.c b/labeller.c index 71c0f55..c386574 100644 --- a/labeller.c +++ b/labeller.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "leo.h" #include "sym.h" @@ -47,6 +48,15 @@ uns num_map_parts_row = 0; uns num_map_parts_col = 0; uns num_map_parts = 0; +static struct cf_section labelling_cf = { + CF_ITEMS { + CF_DOUBLE("MaxSectionLenght", &conf_max_section_length), + CF_DOUBLE("MaxSectionOverlay", &conf_max_section_overlay), + CF_DOUBLE("BitmapGranularity", &bitmap_granularity), + CF_END + } +}; + static void labeller_add_linelabel(struct symbol *sym, struct osm_object *o, z_index_t zindex); static void labeller_add_arealabel(struct symbol *sym, struct osm_object *o, z_index_t zindex); @@ -57,6 +67,9 @@ static void compute_sizes(void) page_width_int = floor(page_width); page_height_int = floor(page_height); + page_width_gran = page_width * bitmap_granularity; + page_height_gran = page_height * bitmap_granularity; + num_map_parts_row = (page_width_int + conf_map_part_width) / conf_map_part_width; num_map_parts_col = (page_height_int + conf_map_part_height) / conf_map_part_height; num_map_parts = num_map_parts_row * num_map_parts_col; @@ -65,8 +78,8 @@ static void compute_sizes(void) void labeller_conf(void) { + cf_declare_section("Labelling", &labelling_cf, 0); evolution_conf(); - lines_conf(); } void labeller_init(void)