def within_line(self, viewer, points, p_start, p_stop, canvas_radius):
        """Points `points` and line endpoints `p_start`, `p_stop` are in
        data coordinates.
        Return True for points within the line defined by a line from
        p_start to p_end and within `canvas_radius`.
        The distance between points is scaled by the viewer's canvas scale.
        """
        scale_x, scale_y = viewer.get_scale_xy()
        new_radius = canvas_radius * 1.0 / min(scale_x, scale_y)

        return self.point_within_line(points, p_start, p_stop, new_radius)
Points `points` and line endpoints `p_start`, `p_stop` are in
        data coordinates.
        Return True for points within the line defined by a line from
        p_start to p_end and within `canvas_radius`.
        The distance between points is scaled by the viewer's canvas scale.