Ejemplo n.º 1
0
 def _curveToOne(self, bcp1, bcp2, pt):
     self._addMoveTo()
     bounds = self.bounds
     bounds = updateBounds(bounds, bcp1)
     bounds = updateBounds(bounds, bcp2)
     bounds = updateBounds(bounds, pt)
     self.bounds = bounds
Ejemplo n.º 2
0
	def _curveToOne(self, bcp1, bcp2, pt):
		self._addMoveTo()
		bounds = self.bounds
		bounds = updateBounds(bounds, bcp1)
		bounds = updateBounds(bounds, bcp2)
		bounds = updateBounds(bounds, pt)
		self.bounds = bounds
 def _qCurveToOne(self, bcp, pt):
     bounds = self.bounds
     bounds = updateBounds(bounds, pt)
     if not pointInRect(bcp, bounds):
         bounds = unionRect(
             bounds, calcQuadraticBounds(self._getCurrentPoint(), bcp, pt))
     self.bounds = bounds
 def _moveTo(self, pt):
     bounds = self.bounds
     if bounds:
         self.bounds = updateBounds(bounds, pt)
     else:
         x, y = pt
         self.bounds = (x, y, x, y)
Ejemplo n.º 5
0
	def _qCurveToOne(self, bcp, pt):
		bounds = self.bounds
		bounds = updateBounds(bounds, pt)
		if not pointInRect(bcp, bounds):
			bounds = unionRect(bounds, calcQuadraticBounds(
					self._getCurrentPoint(), bcp, pt))
		self.bounds = bounds
Ejemplo n.º 6
0
	def _curveToOne(self, bcp1, bcp2, pt):
		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
Ejemplo n.º 7
0
	def _moveTo(self, pt):
		bounds = self.bounds
		if bounds:
			self.bounds = updateBounds(bounds, pt)
		else:
			x, y = pt
			self.bounds = (x, y, x, y)
Ejemplo n.º 8
0
	def _curveToOne(self, bcp1, bcp2, pt):
		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
Ejemplo n.º 9
0
 def _addMoveTo(self):
     if self._start is None:
         return
     bounds = self.bounds
     if bounds:
         self.bounds = updateBounds(bounds, self._start)
     else:
         x, y = self._start
         self.bounds = (x, y, x, y)
     self._start = None
Ejemplo n.º 10
0
	def _addMoveTo(self):
		if self._start is None:
			return
		bounds = self.bounds
		if bounds:
			self.bounds = updateBounds(bounds, self._start)
		else:
			x, y = self._start
			self.bounds = (x, y, x, y)
		self._start = None
Ejemplo n.º 11
0
	def _qCurveToOne(self, bcp, pt):
		bounds = self.bounds
		bounds = updateBounds(bounds, bcp)
		bounds = updateBounds(bounds, pt)
		self.bounds = bounds
Ejemplo n.º 12
0
	def _lineTo(self, pt):
		self.bounds = updateBounds(self.bounds, pt)
Ejemplo n.º 13
0
 def _qCurveToOne(self, bcp, pt):
     self._addMoveTo()
     bounds = self.bounds
     bounds = updateBounds(bounds, bcp)
     bounds = updateBounds(bounds, pt)
     self.bounds = bounds
 def _lineTo(self, pt):
     self.bounds = updateBounds(self.bounds, pt)
Ejemplo n.º 15
0
 def _lineTo(self, pt):
     self._addMoveTo()
     self.bounds = updateBounds(self.bounds, pt)
Ejemplo n.º 16
0
def test_updateBounds():
    assert updateBounds((0, 0, 0, 0), (100, 100)) == (0, 0, 100, 100)
Ejemplo n.º 17
0
def test_updateBounds():
    assert updateBounds((0, 0, 0, 0), (100, 100)) == (0, 0, 100, 100)
Ejemplo n.º 18
0
	def _lineTo(self, pt):
		self._addMoveTo()
		self.bounds = updateBounds(self.bounds, pt)