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()
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 ) :
+
+ center_x , center_y = self.center()
+
+ gc = pixmap.new_gc()
+ gc.foreground = pixmap.get_colormap().alloc_color( colorname )
+
+ src_x , src_y = self.gps2pix( start , ( center_x , center_y ) )
+ dest_x , dest_y = self.gps2pix( coords , ( center_x , center_y ) )
+ dist = math.sqrt( (dest_x-src_x)**2 + (dest_y-src_y)**2 )
+ pixmap.draw_line(gc , src_x , src_y , dest_x , dest_y )
def plot_APs( self ) :