def test_openPaths(self): pen = AreaPen() pen.moveTo((0, 0)) pen.endPath() self.assertEqual(0, pen.value) pen.moveTo((0, 0)) pen.lineTo((1, 0)) with self.assertRaises(NotImplementedError): pen.endPath()
def test_openPaths(self): pen = AreaPen() pen.moveTo((0, 0)) pen.endPath() self.assertEqual(0, pen.value) pen.moveTo((0, 0)) pen.lineTo((1, 0)) with self.assertRaises(NotImplementedError): pen.endPath()
def _get_clockwise(self): if self._clockwise is None: pen = AreaPen() pen.endPath = pen.closePath self.draw(pen) self._clockwise = pen.value < 0 return self._clockwise
def _get_clockwise(self): if self._clockwise is None: pen = AreaPen() pen.endPath = pen.closePath self.draw(pen) self._clockwise = pen.value < 0 return self._clockwise
def _get_clockwise(self): from fontTools.pens.areaPen import AreaPen pen = AreaPen() pen.endPath = pen.closePath self.drawToPen(pen) return pen.value < 0
def contourClockwiseRepresentationFactory(contour): pen = AreaPen() pen.endPath = pen.closePath contour.draw(pen) return pen.value < 0
def contourClockwiseRepresentationFactory(contour): pen = AreaPen() pen.endPath = pen.closePath contour.draw(pen) return pen.value < 0