/[zanavi_public1]/navit/navit/android/src/com/zoffcc/applications/zanavi/NavitAndroidOverlay.java
ZANavi

Diff of /navit/navit/android/src/com/zoffcc/applications/zanavi/NavitAndroidOverlay.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 30 Revision 31
1/** 1/**
2 * ZANavi, Zoff Android Navigation system. 2 * ZANavi, Zoff Android Navigation system.
3 * Copyright (C) 2011 Zoff <zoff@zoff.cc> 3 * Copyright (C) 2011 -2012 Zoff <zoff@zoff.cc>
4 * 4 *
5 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License 6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation. 7 * version 2 as published by the Free Software Foundation.
8 * 8 *
256 } 256 }
257 catch (Exception e) 257 catch (Exception e)
258 { 258 {
259 e.printStackTrace(); 259 e.printStackTrace();
260 } 260 }
261
262 // DEBUG: clear route rectangle list
263 NavitGraphics.route_rects.clear();
261 264
262 if (NavitGraphics.navit_route_status == 0) 265 if (NavitGraphics.navit_route_status == 0)
263 { 266 {
264 Navit.destination_set(); 267 Navit.destination_set();
265 268
622 h_2 = (int) ((2 * 70f / 1.5f) * draw_factor) + 5 + 25 + 25; 625 h_2 = (int) ((2 * 70f / 1.5f) * draw_factor) + 5 + 25 + 25;
623 zoomout_ltx = w_2; 626 zoomout_ltx = w_2;
624 zoomout_lty = h_2; 627 zoomout_lty = h_2;
625 this.zoomout_button_rect = new RectF(w_2, h_2, Navit.zoomout.getWidth() + w_2, h_button_zoom + h_2); 628 this.zoomout_button_rect = new RectF(w_2, h_2, Navit.zoomout.getWidth() + w_2, h_button_zoom + h_2);
626 629
627 int mapdrawing_width = 75; 630 int mapdrawing_width = (int) ((75f / 1.5f) * draw_factor);
628 int mapdrawing_height = 75; 631 int mapdrawing_height = (int) ((75f / 1.5f) * draw_factor);
629 w_2 = (int) (((this.mCanvasWidth - mapdrawing_width) / 1.5f) * draw_factor) - 5; 632 w_2 = (int) ((this.mCanvasWidth - mapdrawing_width) - 5);
630 h_2 = (int) ((70f / 1.5f) * draw_factor) + 5 + 25; 633 h_2 = (int) ((70f / 1.5f) * draw_factor) + 5 + 25;
631 mapdrawing_ltx = w_2; 634 mapdrawing_ltx = w_2;
632 mapdrawing_lty = h_2; 635 mapdrawing_lty = h_2;
633 this.mapdrawing_button_rect = new RectF(w_2, h_2, mapdrawing_width + w_2, mapdrawing_height + h_2); 636 this.mapdrawing_button_rect = new RectF(w_2, h_2, mapdrawing_width + w_2, mapdrawing_height + h_2);
634 } 637 }
815 //paint.setStyle(Style.STROKE); 818 //paint.setStyle(Style.STROKE);
816 //paint.setColor(Color.GRAY); 819 //paint.setColor(Color.GRAY);
817 //paint.setAlpha(30); 820 //paint.setAlpha(30);
818 c.drawRoundRect(this.zoomout_button_rect, 10, 10, paint); 821 c.drawRoundRect(this.zoomout_button_rect, 10, 10, paint);
819 c.drawRoundRect(this.mapdrawing_button_rect, 10, 10, paint); 822 c.drawRoundRect(this.mapdrawing_button_rect, 10, 10, paint);
823 if ((draw_factor == 0.7f) || (draw_factor == 1.0f))
824 {
825 paint.setStrokeWidth(6);
826 }
827 else
828 {
820 paint.setStrokeWidth(10); 829 paint.setStrokeWidth(10);
830 }
821 paint.setAlpha(80); 831 paint.setAlpha(80);
822 c.drawLine(this.mapdrawing_button_rect.left + 10, this.mapdrawing_button_rect.bottom - 10, this.mapdrawing_button_rect.right - 10, this.mapdrawing_button_rect.top + 10, paint); 832 c.drawLine(this.mapdrawing_button_rect.left + 10, this.mapdrawing_button_rect.bottom - 10, this.mapdrawing_button_rect.right - 10, this.mapdrawing_button_rect.top + 10, paint);
823 } 833 }
824 834
825 if (NavitGraphics.in_map) 835 if (NavitGraphics.in_map)

Legend:
Removed from v.30  
changed lines
  Added in v.31

   
Visit the ZANavi Wiki