-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the CanvasPlus wiki!
Here you will find the documentation for the latest version of CanvasPlus
To start, make sure you have CanvasPlus installed or cloned. You can do this with one of two methods.
Pip install this package
pip install CanvasPlus
Download a zip file containing all files.
git clone https://github.com/Luke-zhang-04/CanvasPlus.git
or
Clone the latest stable Release

There are a few ways to import the module. It is advised that you do not import the entire module.
from CanvasPlus import CanvasPlus
CanvasPlus()import CanvasPlus
CanvasPlus.CanvasPlus()from CanvasPlus.canvasplus import CanvasPlus
CanvasPlus()import CanvasPlus.canvasplus as CanvasPlus
CanvasPlus.CanvasPlus()If there is no __init__.py file and the source code is in a different directory as your project (why would you do this?)
from canvasplus import CanvasPlus
CanvasPlus()import canvasplus
canvasplus.CanvasPlus()After, you can set up with what you normally would, with one change; instead of the Canvas class, use the imported CanvasPlus class
from canvasplus import CanvasPlus #or another import method of your choice (described above)
from tkinter import Tk
root = Tk()
canvas = CanvasPlus(
root, width = 800, height = 800, background = "white"
)
canvas.pack()
canvas.update()Copyright (C) 2020 Luke Zhang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the conditions at https://github.com/Luke-zhang-04/CanvasPlus/blob/master/LICENSE.