DaMaze
This commit is contained in:
14
Line.py
Normal file
14
Line.py
Normal 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)
|
||||
Reference in New Issue
Block a user