예제 #1
0
 def test_ignoreSinglePoint(self):
     pen = ControlBoundsPen(None, ignoreSinglePoints=True)
     pen.moveTo((0, 10))
     self.assertEqual(None, pen.bounds)
예제 #2
0
 def test_quadraticCurve(self):
     pen = ControlBoundsPen(None)
     pen.moveTo((0, 0))
     pen.qCurveTo((6, 6), (10, 0))
     self.assertEqual("0 0 10 6", bounds_(pen))
예제 #3
0
 def test_singlePoint(self):
     pen = ControlBoundsPen(None)
     pen.moveTo((-5, 10))
     self.assertEqual("-5 10 -5 10", bounds_(pen))
예제 #4
0
 def test_curve(self):
     pen = ControlBoundsPen(None)
     pen.moveTo((0, 0))
     pen.curveTo((20, 10), (90, 40), (0, 0))
     self.assertEqual("0 0 90 40", bounds_(pen))
예제 #5
0
 def test_ignoreSinglePoint(self):
     pen = ControlBoundsPen(None, ignoreSinglePoints=True)
     pen.moveTo((0, 10))
     self.assertEqual(None, pen.bounds)
예제 #6
0
 def test_singlePoint(self):
     pen = ControlBoundsPen(None)
     pen.moveTo((-5, 10))
     self.assertEqual("-5 10 -5 10", bounds_(pen))
예제 #7
0
 def test_quadraticCurve(self):
     pen = ControlBoundsPen(None)
     pen.moveTo((0, 0))
     pen.qCurveTo((6, 6), (10, 0))
     self.assertEqual("0 0 10 6", bounds_(pen))
예제 #8
0
 def test_curve(self):
     pen = ControlBoundsPen(None)
     pen.moveTo((0, 0))
     pen.curveTo((20, 10), (90, 40), (0, 0))
     self.assertEqual("0 0 90 40", bounds_(pen))