dest_x , dest_y = self.gps2pix( coords , ( center_x , center_y ) )
pixmap.draw_rectangle(gc, True , dest_x , dest_y , radius , radius )
+ 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 ) :
pixmap,mask = self.get_pixbuf().render_pixmap_and_mask()