Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
 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" />')
Ejemplo n.º 3
0
 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" />')
Ejemplo n.º 4
0
 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" />')
Ejemplo n.º 5
0
 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" />')