Configure polygonitem polyitem according to provided arguments: coordlist is sequence of coordinates fill is filling color outline is outline color top is a boolean value, which specifies if polyitem will be put on top of the canvas' displaylist so it
(self, polyitem, coordlist, fill=None,
outline=None, width=None, top=False)
| 394 | return self.cv.create_polygon((0, 0, 0, 0, 0, 0), fill="", outline="") |
| 395 | |
| 396 | def _drawpoly(self, polyitem, coordlist, fill=None, |
| 397 | outline=None, width=None, top=False): |
| 398 | """Configure polygonitem polyitem according to provided |
| 399 | arguments: |
| 400 | coordlist is sequence of coordinates |
| 401 | fill is filling color |
| 402 | outline is outline color |
| 403 | top is a boolean value, which specifies if polyitem |
| 404 | will be put on top of the canvas' displaylist so it |
| 405 | will not be covered by other items. |
| 406 | """ |
| 407 | cl = [] |
| 408 | for x, y in coordlist: |
| 409 | cl.append(x * self.xscale) |
| 410 | cl.append(-y * self.yscale) |
| 411 | self.cv.coords(polyitem, *cl) |
| 412 | if fill is not None: |
| 413 | self.cv.itemconfigure(polyitem, fill=fill) |
| 414 | if outline is not None: |
| 415 | self.cv.itemconfigure(polyitem, outline=outline) |
| 416 | if width is not None: |
| 417 | self.cv.itemconfigure(polyitem, width=width) |
| 418 | if top: |
| 419 | self.cv.tag_raise(polyitem) |
| 420 | |
| 421 | def _createline(self): |
| 422 | """Create an invisible line item on canvas self.cv) |
no outgoing calls
no test coverage detected