Use real radius for drawing (57660db6f7d449446c8e1531235aadf315328e7a) master
authorJavier Palacios <javiplx@gmail.com>
Fri, 2 Nov 2012 15:23:11 +0000 (16:23 +0100)
committerJavier Palacios <javiplx@gmail.com>
Fri, 2 Nov 2012 15:25:17 +0000 (16:25 +0100)
wifiscanner/wifimap/view.py

index a7f688c..175eae8 100755 (executable)
@@ -221,7 +221,7 @@ class simpleMapWidget ( AbstractmapWidget , gtk.Image ) :
 
         return center_x , center_y
 
-    def plot( self , pixmap , coords , colorname , radius=3 ) :
+    def plot( self , pixmap , coords , colorname , radius=1 ) :
 
         center_x , center_y = self.center()
 
@@ -229,7 +229,7 @@ class simpleMapWidget ( AbstractmapWidget , gtk.Image ) :
         gc.foreground = pixmap.get_colormap().alloc_color( colorname )
 
         dest_x , dest_y = self.gps2pix( coords , ( center_x , center_y ) )
-        pixmap.draw_rectangle(gc, True , dest_x , dest_y , radius , radius )
+        pixmap.draw_rectangle(gc, True , dest_x-radius , dest_y-radius , 2*radius+1 , 2*radius+1 )
 
     def line( self , pixmap , start , coords , colorname ) :