diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-09-25 21:09:14 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-09-25 21:09:14 +0000 |
commit | edd42e879f5ed8d846650c21190c5c8a2689363b (patch) | |
tree | 637de030a56af4cace13668155b3a03771a6074b /navit/xmlconfig.c | |
parent | d676ed1b3b9d64952053ce066a0e59a1d2f3c5e9 (diff) | |
download | navit-edd42e879f5ed8d846650c21190c5c8a2689363b.tar.gz |
Add:Core:Added support for arrows showing the direction of lines
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1417 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/xmlconfig.c')
-rw-r--r-- | navit/xmlconfig.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/navit/xmlconfig.c b/navit/xmlconfig.c index cb5b258cf..1c69adbdf 100644 --- a/navit/xmlconfig.c +++ b/navit/xmlconfig.c @@ -615,6 +615,17 @@ xmlconfig_image(struct xmlstate *state) return 1; } +static int +xmlconfig_arrows(struct xmlstate *state) +{ + state->element_attr.u.data=arrows_new(convert_to_attrs(state)); + if (! state->element_attr.u.data) + return 0; + itemtype_add_element(state->parent->element_attr.u.data, state->element_attr.u.data); + + return 1; +} + #define NEW(x) (void *(*)(struct attr *, struct attr **))(x) #define ADD(x) (int (*)(void *, struct attr *attr))(x) #define INIT(x) (int (*)(void *))(x) @@ -628,6 +639,7 @@ struct element_func { int (*init)(void *); void (*destroy)(void *); } elements[] = { + { "arrows", "item", xmlconfig_arrows}, { "config", NULL, xmlconfig_config}, { "debug", "config", xmlconfig_debug}, { "navit", "config", NULL, NEW(navit_new), ADD(navit_add_attr), INIT(navit_init), DESTROY(navit_destroy)}, |