Fix:android:Made compileable again
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 17 Jun 2012 08:26:18 +0000 (08:26 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 17 Jun 2012 08:26:18 +0000 (08:26 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5148 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/android/src/org/navitproject/navit/NavitGraphics.java

index d951863..9102c88 100644 (file)
@@ -875,16 +875,16 @@ public class NavitGraphics
                        in_map = (disable==0);
                if (overlay_disabled != disable) {
                        overlay_disabled = disable;
-                       if (parent_graphics) {
+                       if (parent_graphics != null) {
                                int x = pos_x;
                                int y = pos_y;
-                               int width = w;
-                               int height = h;
-                               if (pos_wraparound != 0 && x < 0) x += parent_graphics.w;
-                               if (pos_wraparound != 0 && y < 0) y += parent_graphics.h;
-                               if (pos_wraparound != 0 && width < 0) width += parent_graphics.w;
-                               if (pos_wraparound != 0 && height < 0) height += parent_graphics.h;
-                               canvas.invalidate(x,y,x+w,y+h);
+                               int width = bitmap_width;
+                               int height = bitmap_height;
+                               if (pos_wraparound != 0 && x < 0) x += parent_graphics.bitmap_width;
+                               if (pos_wraparound != 0 && y < 0) y += parent_graphics.bitmap_height;
+                               if (pos_wraparound != 0 && width < 0) width += parent_graphics.bitmap_width;
+                               if (pos_wraparound != 0 && height < 0) height += parent_graphics.bitmap_height;
+                               draw_canvas.invalidate(x,y,x+w,y+h);
                        }
                }
        }