def test_ignoreSinglePoint(self): pen = ControlBoundsPen(None, ignoreSinglePoints=True) pen.moveTo((0, 10)) self.assertEqual(None, pen.bounds)
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))
def test_singlePoint(self): pen = ControlBoundsPen(None) pen.moveTo((-5, 10)) self.assertEqual("-5 10 -5 10", bounds_(pen))
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))