summaryrefslogtreecommitdiff
path: root/navit/coord.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/coord.c')
-rw-r--r--navit/coord.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/navit/coord.c b/navit/coord.c
index fc262bb5e..787934788 100644
--- a/navit/coord.c
+++ b/navit/coord.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <math.h>
#include "debug.h"
+#include "item.h"
#include "coord.h"
#include "transform.h"
#include "projection.h"
@@ -57,6 +58,18 @@ coord_new(int x, int y)
return c;
}
+struct coord *
+coord_new_from_attrs(struct attr *parent, struct attr **attrs)
+{
+ struct attr *x,*y;
+ x=attr_search(attrs, NULL, attr_x);
+ y=attr_search(attrs, NULL, attr_y);
+ if (!x || !y)
+ return NULL;
+ return coord_new(x->u.num, y->u.num);
+}
+
+
void
coord_destroy(struct coord *c)
{