MCPcopy Index your code
hub / github.com/csev/py4e / _draw

Method _draw

code/graphics/graphics.py:587–592  ·  view source on GitHub ↗
(self, canvas, options)

Source from the content-addressed store, hash-verified

585 _BBox.__init__(self, p1, p2)
586
587 def _draw(self, canvas, options):
588 p1 = self.p1
589 p2 = self.p2
590 x1,y1 = canvas.toScreen(p1.x,p1.y)
591 x2,y2 = canvas.toScreen(p2.x,p2.y)
592 return canvas.create_rectangle(x1,y1,x2,y2,options)
593
594 def __str__(self):
595 return "Rect: %s to %s" % (self.p1.coordStr(), self.p2.coordStr())

Callers

nothing calls this directly

Calls 1

toScreenMethod · 0.80

Tested by

no test coverage detected