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)
| 493 | return self.cv.create_polygon((0, 0, 0, 0, 0, 0), fill="", outline="") |
| 494 | |
| 495 | def _drawpoly(self, polyitem, coordlist, fill=None, |
| 496 | outline=None, width=None, top=False): |
| 497 | """Configure polygonitem polyitem according to provided |
| 498 | arguments: |
| 499 | coordlist is sequence of coordinates |
| 500 | fill is filling color |
| 501 | outline is outline color |
| 502 | top is a boolean value, which specifies if polyitem |
| 503 | will be put on top of the canvas' displaylist so it |
| 504 | will not be covered by other items. |
| 505 | """ |
| 506 | cl = [] |
| 507 | for x, y in coordlist: |
| 508 | cl.append(x * self.xscale) |
| 509 | cl.append(-y * self.yscale) |
| 510 | self.cv.coords(polyitem, *cl) |
| 511 | if fill is not None: |
| 512 | self.cv.itemconfigure(polyitem, fill=fill) |
| 513 | if outline is not None: |
| 514 | self.cv.itemconfigure(polyitem, outline=outline) |
| 515 | if width is not None: |
| 516 | self.cv.itemconfigure(polyitem, width=width) |
| 517 | if top: |
| 518 | self.cv.tag_raise(polyitem) |
| 519 | |
| 520 | def _createline(self): |
| 521 | """Create an invisible line item on canvas self.cv) |
no test coverage detected