(box: Box)
| 14 | def render_drawing(canvas: tk.Canvas, drawing: Drawing): |
| 15 | |
| 16 | def draw_box(box: Box): |
| 17 | x1, y1 = box.x, box.y |
| 18 | x2, y2 = x1 + box.width, y1 + box.height |
| 19 | canvas.create_rectangle( |
| 20 | x1, |
| 21 | y1, |
| 22 | x2, |
| 23 | y2, |
| 24 | outline=getattr(box.style, "line_color", None) or "black", |
| 25 | fill=getattr(box.style, "fill_color", None) or "", |
| 26 | ) |
| 27 | if box.text: |
| 28 | canvas.create_text((x1 + x2) / 2, (y1 + y2) / 2, text=box.text, fill="black") |
| 29 | |
| 30 | def draw_ellipse(ellipse: Ellipse): |
| 31 | x1, y1 = ellipse.x, ellipse.y |
no outgoing calls
no test coverage detected
searching dependent graphs…