(self, image, old_x_y, x_y, theta)
draw lines on image from old_x_y to x_y representing vacuum coverage,
        taking into account angle theta (roomba angle).
        Do mnot draw if either co-ordinate is None
draw lines on image from old_x_y to x_y representing vacuum coverage,
        taking into account angle theta (roomba angle).
        Do mnot draw if either co-ordinate is None
draw lines on image from old_x_y to x_y representing vacuum coverage taking into account angle theta ( roomba angle ) . Do mnot draw if either co - ordinate is None
def draw_vacuum_lines(self, image, old_x_y, x_y, theta):
        '''
        draw lines on image from old_x_y to x_y representing vacuum coverage,
        taking into account angle theta (roomba angle).
        Do mnot draw if either co-ordinate is None
        '''
        if old_x_y is None or x_y is None or \
           x_y[0] > self.base.size[0] or x_y[1] > self.base.size[1] or \
           x_y[0] < 0 or x_y[1] < 0 or \
           old_x_y[0] > self.base.size[0] or old_x_y[1] > self.base.size[1] or \
           old_x_y[0] < 0 or old_x_y[1] < 0:
            self.log.warning('MAP: Not drawing line {}, {}: value out of range'.format(old_x_y, x_y))
            return
        if self.distance_between(x_y, old_x_y) > self.max_distance:
            self.log.warning('MAP: Not drawing line {}, {}: distance is greater than {}'.format(old_x_y, x_y, self.max_distance))
            return
        lines = ImageDraw.Draw(image)
        if x_y != old_x_y:
            self.log.info("MAP: drawing line: {}, {}".format(old_x_y, x_y))
            lines.line([old_x_y, x_y], fill=self.fillColor,
                       width=self.icons['roomba'].size[0] // 2)
        #draw circle over roomba vacuum area to give smooth edges.
        arcbox = [x_y[0]-self.icons['roomba'].size[0] // 4,
                  x_y[1]-self.icons['roomba'].size[0] // 4,
                  x_y[0]+self.icons['roomba'].size[0] // 4,
                  x_y[1]+self.icons['roomba'].size[0] // 4]
        lines.ellipse(arcbox, fill=self.fillColor)
def draw_vacuum_lines ( self , image , old_x_y , x_y , theta ) : if old_x_y is None or x_y is None or x_y [ 0 ] > self . base . size [ 0 ] or x_y [ 1 ] > self . base . size [ 1 ] or x_y [ 0 ] < 0 or x_y [ 1 ] < 0 or old_x_y [ 0 ] > self . base . size [ 0 ] or old_x_y [ 1 ] > self . base . size [ 1 ] or old_x_y [ 0 ] < 0 or old_x_y [ 1 ] < 0 : self . log . warning ( 'MAP: Not drawing line {}, {}: value out of range' . format ( old_x_y , x_y ) ) return if self . distance_between ( x_y , old_x_y ) > self . max_distance : self . log . warning ( 'MAP: Not drawing line {}, {}: distance is greater than {}' . format ( old_x_y , x_y , self . max_distance ) ) return lines = ImageDraw . Draw ( image ) if x_y != old_x_y : self . log . info ( "MAP: drawing line: {}, {}" . format ( old_x_y , x_y ) ) lines . line ( [ old_x_y , x_y ] , fill = self . fillColor , width = self . icons [ 'roomba' ] . size [ 0 ] // 2 ) #draw circle over roomba vacuum area to give smooth edges. arcbox = [ x_y [ 0 ] - self . icons [ 'roomba' ] . size [ 0 ] // 4 , x_y [ 1 ] - self . icons [ 'roomba' ] . size [ 0 ] // 4 , x_y [ 0 ] + self . icons [ 'roomba' ] . size [ 0 ] // 4 , x_y [ 1 ] + self . icons [ 'roomba' ] . size [ 0 ] // 4 ] lines . ellipse ( arcbox , fill = self . fillColor )