def _curveToOne(self, bcp1, bcp2, pt): self._addMoveTo() bounds = self.bounds bounds = updateBounds(bounds, pt) if not pointInRect(bcp1, bounds) or not pointInRect(bcp2, bounds): bounds = unionRect(bounds, calcCubicBounds( self._getCurrentPoint(), bcp1, bcp2, pt)) self.bounds = bounds
for i in range(c): noNumpyBezierTools.calcQuadraticParameters(pt1, pt2, pt3) print time.time() - n print "calcBounds\t\t\t", n = time.time() for i in range(c): noNumpyArrayTools.calcBounds( [pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3]) print time.time() - n print "pointsInRect\t\t\t", n = time.time() for i in range(c): noNumpyArrayTools.pointsInRect( [pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3, pt4], rect) print time.time() - n print "calcQuadraticBounds\t\t", n = time.time() for i in range(c): noNumpyBezierTools.calcQuadraticBounds(pt1, pt2, pt3) print time.time() - n print "calcCubicBounds\t\t\t", n = time.time() for i in range(c): noNumpyBezierTools.calcCubicBounds(pt1, pt2, pt3, pt4) print time.time() - n
noNumpyBezierTools.calcQuadraticParameters(pt1, pt2, pt3) print time.time() - n print "calcBounds\t\t\t", n = time.time() for i in range(c): noNumpyArrayTools.calcBounds([pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3]) print time.time() - n print "pointsInRect\t\t\t", n = time.time() for i in range(c): noNumpyArrayTools.pointsInRect([pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3, pt1, pt2, pt3, pt4], rect) print time.time() - n print "calcQuadraticBounds\t\t", n = time.time() for i in range(c): noNumpyBezierTools.calcQuadraticBounds(pt1, pt2, pt3) print time.time() - n print "calcCubicBounds\t\t\t", n = time.time() for i in range(c): noNumpyBezierTools.calcCubicBounds(pt1, pt2, pt3, pt4) print time.time() - n