예제 #1
0
 def test_max_point_arc(self):
     """max_point() of an arc tracing bottom-right quarter"""
     arc = Arc(2, 3, 0, 0.5, 5)
     self.assertEqual(arc.max_point().x, 7)
     self.assertEqual(arc.max_point().y, 8)
예제 #2
0
 def test_max_point_arc_wraparound(self):
     """max_point() of an arc that traces through 0 degrees"""
     arc = Arc(2, 3, 1.75, 0.25, 5)
     self.assertEqual(arc.max_point().x, 5 + 2)
     self.assertEqual(arc.max_point().y, int(round(sin(0.25 * pi) * 5 + 3)))
예제 #3
0
 def test_max_point_arc_is_circle(self):
     '''max_point() when an arc actually traces out a full circle'''
     arc = Arc(2, 3, 0, 2, 5)
     self.assertEqual(arc.max_point().x, 7)
     self.assertEqual(arc.max_point().y, 8)