def get_line(self, value, color, **options): end = self.calc_slice_coord(value, self.r) start = (self.x0, self.y0) line = Line(start, end, stroke=color, stroke_dasharray="4 4") return line.tostring()
def test_coordinates(self): line = Line(start=('10cm', '11cm'), end=('20cm', '30cm')) self.assertEqual(line.tostring(), '<line x1="10cm" x2="20cm" y1="11cm" y2="30cm" />')
def test_coordinates(self): line = Line(start=('10cm','11cm'), end=('20cm', '30cm')) self.assertEqual(line.tostring(), '<line x1="10cm" x2="20cm" y1="11cm" y2="30cm" />')
def test_numbers(self): line = Line(start=(0, 0), end=(10, 20)) self.assertEqual(line.tostring(), '<line x1="0" x2="10" y1="0" y2="20" />')
def test_numbers(self): line = Line(start=(0,0), end=(10,20)) self.assertEqual(line.tostring(), '<line x1="0" x2="10" y1="0" y2="20" />')