Skip to main content

Improved Canvas widget for tkinter with more functionality to display graphical elements like lines or text.

Project description

Canvas Plus

V1.1.0

forthebadge made-with-python PyPI version shields.io GitHub release GitHub license PyPI pyversions

An improved Canvas widget for tkinter with more functionality to display graphical elements like lines or text.

Tkinter's Canvas widget has some limitations which are adressed in this package.

Simmilar to the default tkinter Canvas widget, e.g canvas.create_rectangle, other canvas objects can be created.

Usage

Usage is very simple, especially for those with experience using tkinter canvas.

Example:

from tkinter import Tk
import math

root = Tk()
canvas = CanvasPlus(root, width=800, height=800, background = "white")
canvas.pack()

canvas.create_circle(300, 300, 100, fill = "black", outline = "green", width = 3)

canvas.create_round_rectangle(400, 400, 500, 500, radius = 75, fill = "blue", outline = "orange", width = 5)

arrow = canvas.create_arrow(600, 600, 50, 50, 150, 20, fill = "grey", outline = "black")
canvas.rotate(arrow, 600, 600, 310, unit="deg")

rect = canvas.create_rectangle(100, 100, 200, 200, fill = "#f7a8c6", width = 0)
rect = canvas.poly(rect)
canvas.rotate(rect, 150, 150, math.pi/4)

canvas.update()
canvas.mainloop()

Screen Shot 2020-03-30 at 7 21 45 PM

For more information, head over the the wiki

Availability

Option 1: Pip

Pip install this package

pip install CanvasPlus

Option 2: Github

Download a zip file containing all files.

git clone https://github.com/Luke-zhang-04/CanvasPlus.git

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CanvasPlus-1.1.0a0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

CanvasPlus-1.1.0a0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file CanvasPlus-1.1.0a0.tar.gz.

File metadata

  • Download URL: CanvasPlus-1.1.0a0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

File hashes

Hashes for CanvasPlus-1.1.0a0.tar.gz
Algorithm Hash digest
SHA256 5438b105df26c0fda89ef2b9edeca7f24ac6c261eebcd918df1cd929a95c1e76
MD5 0ceea4022d43ab4f5287c396bb32cbe3
BLAKE2b-256 87fe34bd02ece5952d0e863094f0171314f87879d4ae299fcebbcc7fc9279f17

See more details on using hashes here.

File details

Details for the file CanvasPlus-1.1.0a0-py3-none-any.whl.

File metadata

  • Download URL: CanvasPlus-1.1.0a0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

File hashes

Hashes for CanvasPlus-1.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae299dff70c3a06bd81ed79a119c9d9496427b0d81f33a528db4e21bc021fc1e
MD5 9ff3f98cc6b322697b498c7bb1c516ab
BLAKE2b-256 8f768634711018df5b7cc0fbbf08809a241a6d11dc29bbe43ee899e44ef4f5df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page