More bugfixes
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 20 Dec 2007 21:17:44 +0000 (21:17 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 20 Dec 2007 21:17:44 +0000 (21:17 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@658 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/navit.c
navit/src/navit.xml
navit/src/transform.c
navit/src/transform.h

index 0b17b3e..b810fb8 100644 (file)
@@ -211,9 +211,7 @@ navit_button(void *data, int pressed, int button, struct point *p)
                }
                if (this_->moved) {
                        struct point p;
-#if 0
                        transform_get_size(this_->trans, &p.x, &p.y);
-#endif
                        p.x/=2;
                        p.y/=2;
                        p.x-=this_->last.x-this_->pressed.x;
@@ -1056,7 +1054,6 @@ navit_set_center(struct navit *this_, struct coord *center)
 static void
 navit_set_center_cursor(struct navit *this_, struct coord *cursor, int dir, int xpercent, int ypercent)
 {
-#if 0
        struct coord *c=transform_center(this_->trans);
        int width, height;
        struct point p;
@@ -1071,8 +1068,6 @@ navit_set_center_cursor(struct navit *this_, struct coord *cursor, int dir, int
        *c=cnew;
        if (this_->ready)
                navit_draw(this_);
-#endif
-               
 }
 
 
index ffe6546..5191aad 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE navit SYSTEM "navit.dtd">
 <plugins>
-       <plugin path="$NAVIT_LIBDIR/*/${NAVIT_LIBPREFIX}lib*.so" />
+       <plugin path="$NAVIT_LIBDIR/*/${NAVIT_LIBPREFIX}lib*.so"/>
        <plugin path="$NAVIT_LIBDIR/*/${NAVIT_LIBPREFIX}libgraphics_null.so" active="no" />
 </plugins>
 <debug name="navit:do_draw" level="0" />
index 2d11a7b..d4dab91 100644 (file)
@@ -277,14 +277,13 @@ transform_set_size(struct transformation *t, int width, int height)
 }
 #endif
 
-#if 0
 void
 transform_get_size(struct transformation *t, int *width, int *height)
 {
-       *width=t->width;
-       *height=t->height;
+       struct coord_rect *r=&t->screen_sel->u.p_rect;
+       *width=r->rl.x-r->lu.y;
+       *height=r->rl.y-r->lu.y;
 }
-#endif
 
 void
 transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle)
index b49485e..d06075b 100644 (file)
@@ -9,6 +9,7 @@ enum projection;
 struct coord;
 struct coord_geo;
 struct map_selection;
+struct pcoord;
 struct point;
 struct transformation;
 struct transformation *transform_new(void);
@@ -18,10 +19,13 @@ int transform(struct transformation *t, enum projection pro, struct coord *c, st
 void transform_reverse(struct transformation *t, struct point *p, struct coord *c);
 enum projection transform_get_projection(struct transformation *this_);
 void transform_set_projection(struct transformation *this_, enum projection pro);
+struct map_selection *transform_get_selection(struct transformation *this_, enum projection pro, int order);
 struct coord *transform_center(struct transformation *this_);
 void transform_set_angle(struct transformation *t, int angle);
 int transform_get_angle(struct transformation *this_, int angle);
 void transform_set_screen_selection(struct transformation *t, struct map_selection *sel);
+void transform_get_size(struct transformation *t, int *width, int *height);
+void transform_setup(struct transformation *t, struct pcoord *c, int scale, int angle);
 void transform_setup_source_rect(struct transformation *t);
 long transform_get_scale(struct transformation *t);
 void transform_set_scale(struct transformation *t, long scale);
@@ -33,10 +37,6 @@ int transform_distance_sq(struct coord *c1, struct coord *c2);
 int transform_distance_line_sq(struct coord *l0, struct coord *l1, struct coord *ref, struct coord *lpnt);
 int transform_distance_polyline_sq(struct coord *c, int count, struct coord *ref, struct coord *lpnt, int *pos);
 void transform_print_deg(double deg);
-int transform_contains_polygon(struct transformation *t, struct coord *c, int count);
-int transform_contains_polyline(struct transformation *t, struct coord *c, int count);
-int transform_contains_point(struct transformation *t, struct coord *c);
-int is_too_small(struct transformation *t, struct coord *c, int limit);
 int transform_get_angle_delta(struct coord *c1, struct coord *c2, int dir);
 int transform_within_border(struct transformation *this_, struct point *p, int border);
 /* end of prototypes */