(self, roomba_pos, theta)
return roomba_sprite
make a blank image for the text and Roomba overlay, initialized to
        transparent text color
        Paste various Roomba problem icons onto the problems image,
        Paste roomba icon onto roomba_sprite image
        Finally paste the dock icon over it
        add optional debug info, and return the new roomba_sprite image
make a blank image for the text and Roomba overlay, initialized to
        transparent text color
        Paste various Roomba problem icons onto the problems image,
        Paste roomba icon onto roomba_sprite image
        Finally paste the dock icon over it
        add optional debug info, and return the new roomba_sprite image
make a blank image for the text and Roomba overlay initialized to transparent text color Paste various Roomba problem icons onto the problems image Paste roomba icon onto roomba_sprite image Finally paste the dock icon over it add optional debug info and return the new roomba_sprite image
def draw_roomba(self, roomba_pos, theta):
        '''
        make a blank image for the text and Roomba overlay, initialized to
        transparent text color
        Paste various Roomba problem icons onto the problems image,
        Paste roomba icon onto roomba_sprite image
        Finally paste the dock icon over it
        add optional debug info, and return the new roomba_sprite image
        '''
        roomba_sprite = self.make_blank_image()
        self.log.info("MAP: drawing roomba: pos: {}, theta: {}".format(roomba_pos, theta))
        
        #draw roomba
        roomba_sprite = self.transparent_paste(
            roomba_sprite,
            self.icons['roomba'].rotate(theta, expand=False), roomba_pos)

        # paste dock over roomba_sprite
        roomba_sprite = self.transparent_paste(
            roomba_sprite, self.icons['home'], self.dock_position)
            
        if self.debug:
            #draw bounding box, plus overlay co-ordinates on roomba_sprite
            shape = [(10, 10), (self.base.size[0] - 20, self.base.size[1] - 20)]
            box = ImageDraw.Draw(roomba_sprite)
            box.rectangle(shape, fill=None, outline =(255,0,0,255))
            x_y = (roomba_pos[0], roomba_pos[1])
            self.draw_text(roomba_sprite, str(x_y), self.fnt, x_y, (255,0,0,255))
            self.draw_text(roomba_sprite, str(self.dock_position), self.fnt, self.dock_position, (0,0,255,255))
            
        return roomba_sprite
def draw_roomba ( self , roomba_pos , theta ) : roomba_sprite = self . make_blank_image ( ) self . log . info ( "MAP: drawing roomba: pos: {}, theta: {}" . format ( roomba_pos , theta ) ) #draw roomba roomba_sprite = self . transparent_paste ( roomba_sprite , self . icons [ 'roomba' ] . rotate ( theta , expand = False ) , roomba_pos ) # paste dock over roomba_sprite roomba_sprite = self . transparent_paste ( roomba_sprite , self . icons [ 'home' ] , self . dock_position ) if self . debug : #draw bounding box, plus overlay co-ordinates on roomba_sprite shape = [ ( 10 , 10 ) , ( self . base . size [ 0 ] - 20 , self . base . size [ 1 ] - 20 ) ] box = ImageDraw . Draw ( roomba_sprite ) box . rectangle ( shape , fill = None , outline = ( 255 , 0 , 0 , 255 ) ) x_y = ( roomba_pos [ 0 ] , roomba_pos [ 1 ] ) self . draw_text ( roomba_sprite , str ( x_y ) , self . fnt , x_y , ( 255 , 0 , 0 , 255 ) ) self . draw_text ( roomba_sprite , str ( self . dock_position ) , self . fnt , self . dock_position , ( 0 , 0 , 255 , 255 ) ) return roomba_sprite