Example #1
0
	def _qCurveToOne(self, bcp, pt):
		self._addMoveTo()
		bounds = self.bounds
		bounds = updateBounds(bounds, pt)
		if not pointInRect(bcp, bounds):
			bounds = unionRect(bounds, calcQuadraticBounds(
					self._getCurrentPoint(), bcp, pt))
		self.bounds = bounds
	def _qCurveToOne(self, bcp, pt):
		self._addMoveTo()
		bounds = self.bounds
		bounds = updateBounds(bounds, pt)
		if not pointInRect(bcp, bounds):
			bounds = unionRect(bounds, calcQuadraticBounds(
					self._getCurrentPoint(), bcp, pt))
		self.bounds = bounds
Example #3
0
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
Example #4
0
    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