Exemplo n.º 1
0
	def __init__(self):
		super(testIntersection, self).__init__();
		Style.strokeWidth(0.2);
		e1 = Rectangle(0, 0, 100, 100)
		e2 = Rectangle(0, 75, 200, 200)
		self.addShape(e1, e2)
		ps = e1.intersection(e2)
		for p in ps:
			c = Ellipse(p.x, p.y, 1, 1)
			self.addShape(c)
Exemplo n.º 2
0
	def getStyleSheetCopy(self, style):
		if style != None:	
			if not isinstance(style, Style):
				raise TypeError(
						"All shapes should have Style as first parameter"
					)
		return Style.getSnapshot(style)