Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BackgroundBoard(tk.Frame):
- def __init__(self, master=None):
- tk.Frame.__init__(self)
- self.master.title("Chess Python")
- self.background_image = Image.open(os.path.join(
- os.path.dirname(__file__)) + "/img/board.png")
- self.background_photo = ImageTk.PhotoImage(
- self.background_image)
- (backgroundWidth, backgroundHeight) = self.background_image.size
- self.canvas = tk.Canvas(self, width=backgroundWidth,
- height=backgroundHeight)
- self.canvas.pack(side="top", fill="both", expand=True)
- self.canvas.create_image(0, 0, image=self.background_photo,
- anchor="nw")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement