]> mj.ucw.cz Git - leo.git/blobdiff - sym.h
TODO
[leo.git] / sym.h
diff --git a/sym.h b/sym.h
index e846a790df44b6205416111feef6e691476fe5ed..1a45b7ba694d5db6548a6d12a6925aa3a1698089 100644 (file)
--- a/sym.h
+++ b/sym.h
@@ -1,7 +1,7 @@
 /*
  *     Hic Est Leo -- Symbolizers
  *
- *     (c) 2014 Martin Mares <mj@ucw.cz>
+ *     (c) 2014--2015 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef _LEO_SYM_H
@@ -19,6 +19,7 @@ enum symbolizer_type {
   SYMBOLIZER_AREA,
   SYMBOLIZER_TEXT,
   SYMBOLIZER_LINEIMG,
+  SYMBOLIZER_SCALE,
   SYMBOLIZER_MAX,
 };
 
@@ -33,6 +34,7 @@ struct symbolizer {
   void (*draw)(struct symbol *sym, struct svg *svg);
   void (*gen)(struct osm_object *o, struct style_info *si, struct svg *svg);
   void (*init)(void);
+  osm_val_t special;           // Generated automatically only upon request
 };
 
 extern struct mempool *sym_mp;
@@ -132,6 +134,7 @@ struct sym_text {
   color_t text_color;
   double x;
   double y;
+  double rotate;                       // Rotation in degrees CCW
   struct text_font *font;
   double opacity;
   color_t halo_color;
@@ -147,4 +150,18 @@ struct sym_text *sym_text_new(struct osm_object *o);
 
 void scale_text(struct svg *svg, double x, double y, osm_val_t text);
 
+/* sym-scale.c */
+
+struct sym_scale {
+  struct symbol s;
+  double width;
+  color_t color;
+  double casing_width;
+  color_t casing_color;
+  double tick_length;
+};
+
+extern struct symbolizer symbolizer_scale;
+struct sym_scale *sym_scale_new(struct osm_object *o);
+
 #endif