summaryrefslogtreecommitdiff
path: root/navit/layout.h
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@users.noreply.github.com>2019-09-25 21:52:55 +0200
committerGitHub <noreply@github.com>2019-09-25 21:52:55 +0200
commitd68e2171a1c9e1668f04f790d906a22550bb5991 (patch)
tree5899bb1ff3c57b46382b9935217332817c0bac9d /navit/layout.h
parentc85a42d8ce58bc276e133867c8e3efd9de1c74ee (diff)
downloadnavit-d68e2171a1c9e1668f04f790d906a22550bb5991.tar.gz
fix/enhancement:graphics/layout:get default icon size from layout + draw tunnels transparent + mark oneway streets (#884)
This pull request adds the possibility to globally set a default for icon size of a layout. You can now give "icon_h" and "icon_w" properties in "layout" tag. This causes navit to not use the real size of an icon but to scale it to have the requested size. Guessing prescaled icons (the name_w_h.png's of course works. Default size of 22x22px which is the default size hint on most of the svg's is used. This fixes #819. This pull request adds the property "underground_alpha" to the "graphics" tag giving the alpha value to use as transparency if ways are flagged with AF_UNDERGROUND. This effectively renders tunnels in transparent. This pull request adds a "oneway" tag to itemgras in layouts. Together with the enhancements of the "arrows" itemgra used for drawing the route graph one can print nice arrows on oneway roads.
Diffstat (limited to 'navit/layout.h')
-rw-r--r--navit/layout.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/navit/layout.h b/navit/layout.h
index 700e6245a..8b8a63194 100644
--- a/navit/layout.h
+++ b/navit/layout.h
@@ -37,6 +37,7 @@ struct element {
enum { element_point, element_polyline, element_polygon, element_circle, element_text, element_icon, element_image, element_arrows } type;
struct color color;
int text_size;
+ int oneway;
union {
struct element_point {
char stub;
@@ -67,6 +68,9 @@ struct element {
struct element_text {
struct color background_color;
} text;
+ struct element_arrows {
+ int width;
+ } arrows;
} u;
int coord_count;
struct coord *coord;
@@ -105,6 +109,9 @@ struct layout {
char* nightname;
char *font;
struct color color;
+ int underground_alpha;
+ int icon_w;
+ int icon_h;
GList *layers;
GList *cursors;
int order_delta;