This commit is contained in:
2025-02-22 22:49:26 +02:00
commit b215893fe8
8 changed files with 310 additions and 0 deletions

14
Line.py Normal file
View File

@@ -0,0 +1,14 @@
from Point import Point
from tkinter import Canvas
class Line:
def __init__(
self,
p1:Point,
p2:Point,
):
self.p1:Point = p1
self.p2:Point = p2
def draw(self, canvas:Canvas, fill_color:str="black") -> None:
canvas.create_line(self.p1.x, self.p1.y, self.p2.x, self.p2.y, fill=fill_color, width=2)