Configure lineitem according to provided arguments: coordlist is sequence of coordinates fill is drawing color width is width of drawn line. top is a boolean value, which specifies if polyitem will be put on top of the canvas' displaylist so it will no
(self, lineitem, coordlist=None,
fill=None, width=None, top=False)
| 524 | capstyle = TK.ROUND) |
| 525 | |
| 526 | def _drawline(self, lineitem, coordlist=None, |
| 527 | fill=None, width=None, top=False): |
| 528 | """Configure lineitem according to provided arguments: |
| 529 | coordlist is sequence of coordinates |
| 530 | fill is drawing color |
| 531 | width is width of drawn line. |
| 532 | top is a boolean value, which specifies if polyitem |
| 533 | will be put on top of the canvas' displaylist so it |
| 534 | will not be covered by other items. |
| 535 | """ |
| 536 | if coordlist is not None: |
| 537 | cl = [] |
| 538 | for x, y in coordlist: |
| 539 | cl.append(x * self.xscale) |
| 540 | cl.append(-y * self.yscale) |
| 541 | self.cv.coords(lineitem, *cl) |
| 542 | if fill is not None: |
| 543 | self.cv.itemconfigure(lineitem, fill=fill) |
| 544 | if width is not None: |
| 545 | self.cv.itemconfigure(lineitem, width=width) |
| 546 | if top: |
| 547 | self.cv.tag_raise(lineitem) |
| 548 | |
| 549 | def _delete(self, item): |
| 550 | """Delete graphics item from canvas. |
no test coverage detected