X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=leo.c;h=f22e5a50e2de10068658edcbae876840f70b6b30;hb=3eccb27b874cf751c7c807ce444b8bcb37ecf768;hp=5d02f680a90c6e84fe69954e5e32bbf73a2df4d7;hpb=b5ad4205a047a4be68e74c82f5637b13bd3f6896;p=leo.git diff --git a/leo.c b/leo.c index 5d02f68..f22e5a5 100644 --- a/leo.c +++ b/leo.c @@ -18,6 +18,8 @@ #include "sym.h" #include "map.h" +#include "labeller.h" + uns debug_dump_source, debug_dump_after_proj, debug_dump_after_scaling; uns debug_dump_multipolygons, debug_dump_css, debug_dump_styling, debug_dump_symbols; @@ -55,7 +57,7 @@ static void draw_scale(struct svg *svg) svg_push_element(svg, "g"); svg_set_attr(svg, "id", "scale"); - svg_set_attr_format(svg, "transform", "translate(%.6g,%.6g)", x * svg->scale, y * svg->scale); + svg_set_attr_format(svg, "transform", "translate(%s,%s)", svg_format_dimen(svg, x), svg_format_dimen(svg, y)); for (int outline=1; outline>=0; outline--) { @@ -113,8 +115,11 @@ static void draw_scale(struct svg *svg) int main(int argc UNUSED, char **argv) { cf_def_file = "map.cf"; +// HACKING + cf_def_file = argv[1]; cf_declare_section("Debug", &debug_cf, 0); - opt_parse(&options, argv+1); + opt_parse(&options, argv+2); +// TILL HERE osm_init(); styles_init(); @@ -135,6 +140,7 @@ int main(int argc UNUSED, char **argv) } sym_init(); + labeller_init(); map_apply_styles(svg); @@ -165,6 +171,7 @@ int main(int argc UNUSED, char **argv) struct svg_icon *logo = svg_icon_load(svg, "../logo/kocka-s-okrajem.svg"); #endif + labeller_label(); sym_draw_all(svg); // Draw logo