def drawNode(self, node): """This is the recursive method called for each node in the tree. """ if self.verbose: print "### begin _SVGRenderer.drawNode" self._canvas.comment("begin node %s" % ` node `) color = self._canvas._color if not (isinstance(node, Path) and node.isClipPath): pass # self._canvas.saveState() # apply state changes deltas = getStateDelta(node) self._tracker.push(deltas) self.applyStateChanges(deltas, {}) # draw the object, or recurse self.drawNodeDispatcher(node) rDeltas = self._tracker.pop() if not (isinstance(node, Path) and node.isClipPath): pass # self._canvas.restoreState() self._canvas.comment("end node %s" % ` node `) self._canvas._color = color # restore things we might have lost (without actually doing anything). for k, v in rDeltas.items(): if self._restores.has_key(k): setattr(self._canvas, self._restores[k], v) if self.verbose: print "### end _SVGRenderer.drawNode"
def drawNode(self, node): """This is the recursive method called for each node in the tree""" self._canvas.comment('begin node %r'%node) color = self._canvas._color if not (isinstance(node, Path) and node.isClipPath): self._canvas.saveState() #apply state changes deltas = getStateDelta(node) self._tracker.push(deltas) self.applyStateChanges(deltas, {}) #draw the object, or recurse self.drawNodeDispatcher(node) rDeltas = self._tracker.pop() if not (isinstance(node, Path) and node.isClipPath): self._canvas.restoreState() self._canvas.comment('end node %r'%node) self._canvas._color = color #restore things we might have lost (without actually doing anything). for k, v in rDeltas.items(): if k in self._restores: setattr(self._canvas,self._restores[k],v)
def drawNode(self, node): """This is the recursive method called for each node in the tree. """ if self.verbose: print "### begin _SVGRenderer.drawNode" self._canvas.comment('begin node %s'%`node`) color = self._canvas._color if not (isinstance(node, Path) and node.isClipPath): pass # self._canvas.saveState() #apply state changes deltas = getStateDelta(node) self._tracker.push(deltas) self.applyStateChanges(deltas, {}) #draw the object, or recurse self.drawNodeDispatcher(node) rDeltas = self._tracker.pop() if not (isinstance(node, Path) and node.isClipPath): pass # self._canvas.restoreState() self._canvas.comment('end node %s'%`node`) self._canvas._color = color #restore things we might have lost (without actually doing anything). for k, v in rDeltas.items(): if self._restores.has_key(k): setattr(self._canvas,self._restores[k],v) if self.verbose: print "### end _SVGRenderer.drawNode"
def drawNode(self, node): """This is the recursive method called for each node in the tree""" #print "pdf:drawNode", self #if node.__class__ is Wedge: stop if not (isinstance(node, Path) and node.isClipPath): self._canvas.saveState() #apply state changes deltas = getStateDelta(node) self._tracker.push(deltas) self.applyStateChanges(deltas, {}) #draw the object, or recurse self.drawNodeDispatcher(node) self._tracker.pop() if not (isinstance(node, Path) and node.isClipPath): self._canvas.restoreState()
def push(self,node): deltas = getStateDelta(node) self._tracker.push(deltas) self.applyState()