(e)
| 66 | |
| 67 | |
| 68 | def move_logo(e): |
| 69 | global logo, new_x, new_y |
| 70 | canvas_width = image_canvas.winfo_width() |
| 71 | canvas_height = image_canvas.winfo_height() |
| 72 | label_width = image_canvas.bbox(logo)[2] - image_canvas.bbox(logo)[0] |
| 73 | label_height = image_canvas.bbox(logo)[3] - image_canvas.bbox(logo)[1] |
| 74 | |
| 75 | new_x = e.x |
| 76 | new_y = e.y |
| 77 | |
| 78 | if new_x < 0: |
| 79 | new_x = 0 |
| 80 | elif new_x + label_width > canvas_width: |
| 81 | new_x = canvas_width - label_width |
| 82 | |
| 83 | if new_y < 0: |
| 84 | new_y = 0 |
| 85 | elif new_y + label_height > canvas_height: |
| 86 | new_y = canvas_height - label_height |
| 87 | image_canvas.coords(logo, new_x, new_y) |
| 88 | |
| 89 | |
| 90 | def move_text(e): |
nothing calls this directly
no outgoing calls
no test coverage detected