MCPcopy Create free account
hub / github.com/ActiveState/code / draw

Method draw

recipes/Python/578004_processing/recipe-578004.py:49–52  ·  view source on GitHub ↗

Draws a polygon on the underlying canvas.

(self, polygon, fill, outline)

Source from the content-addressed store, hash-verified

47 self.canvas = canvas
48
49 def draw(self, polygon, fill, outline):
50 "Draws a polygon on the underlying canvas."
51 self.canvas.create_polygon(*itertools.chain(*polygon.vertices),
52 fill=fill, outline=outline)
53
54 def write(self, x, y, text, fill):
55 "Writes the text to bottom-left of location."

Callers 2

renderMethod · 0.45
DrawMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected