Draw the object in graphwin, which should be a GraphWin object. A GraphicsObject may only be drawn into one window. Raises an error if attempt made to draw an object that is already visible.
(self, graphwin)
| 451 | self._reconfig("width", width) |
| 452 | |
| 453 | def draw(self, graphwin): |
| 454 | |
| 455 | """Draw the object in graphwin, which should be a GraphWin |
| 456 | object. A GraphicsObject may only be drawn into one |
| 457 | window. Raises an error if attempt made to draw an object that |
| 458 | is already visible.""" |
| 459 | |
| 460 | if self.canvas and not self.canvas.isClosed(): raise GraphicsError, OBJ_ALREADY_DRAWN |
| 461 | if graphwin.isClosed(): raise GraphicsError, "Can't draw to closed window" |
| 462 | self.canvas = graphwin |
| 463 | #self.id = self._draw(graphwin, self.config) |
| 464 | self.id = _tkCall(self._draw, graphwin, self.config) |
| 465 | if graphwin.autoflush: |
| 466 | #_root.update() |
| 467 | _tkCall(_root.update) |
| 468 | |
| 469 | def undraw(self): |
| 470 |
no test coverage detected