def dragLineToPoint(self, point):
        """
        Calculates the new point and adds it to self.draggedPositions.
        Called by mouseDown and mouseDrag
        """
        if getattr(self.brushMode, 'draggableBrush', True):
            if self.lineToolKey:
                if len(self.draggedPositions):
                    points = bresenham.bresenham(self.draggedPositions[0], point)
                    self.draggedPositions = [self.draggedPositions[0]]
                    self.draggedPositions.extend(points[::self.options['Minimum Spacing']][1:])
                elif self.lastPosition is not None:
                    points = bresenham.bresenham(self.lastPosition, point)
                    self.draggedPositions.extend(points[::self.options['Minimum Spacing']][1:])
            else:
                self.draggedPositions.append(point)
        else:
            self.draggedPositions = [point]

        Calculates the new point and adds it to self.draggedPositions.
        Called by mouseDown and mouseDrag
        
editortools/brush.py