예제 #1
0
 def test_min_point_arc(self):
     """min_point() of an arc tracing top-left quarter"""
     arc = Arc(2, 3, 1, 1.5, 5)
     self.assertEqual(arc.min_point().x, -3)
     self.assertEqual(arc.min_point().y, -2)
예제 #2
0
 def test_min_point_arc_wraparound(self):
     """min_point() of an arc that traces through 0 degrees"""
     arc = Arc(2, 3, 1.75, 0.25, 5)
     self.assertEqual(arc.min_point().x, int(round(cos(1.75 * pi) * 5 + 2)))
     self.assertEqual(arc.min_point().y, int(round(sin(1.75 * pi) * 5 + 3)))
예제 #3
0
 def test_min_point_arc_is_circle(self):
     '''min_point() when an arc actually traces out a full circle'''
     arc = Arc(2, 3, 0, 2, 5)
     self.assertEqual(arc.min_point().x, -3)
     self.assertEqual(arc.min_point().y, -2)