{"id":18666817,"url":"https://github.com/luke-zhang-04/canvasplus","last_synced_at":"2025-07-19T16:03:43.380Z","repository":{"id":40543805,"uuid":"238784026","full_name":"Luke-zhang-04/CanvasPlus","owner":"Luke-zhang-04","description":"Improved Canvas widget for Tkinter with more functionality to display graphical elements like lines or text.","archived":false,"fork":false,"pushed_at":"2020-05-10T13:01:11.000Z","size":378,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T21:12:55.269Z","etag":null,"topics":["pypi","python-library","python-package","python3","tkinter-canvas"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luke-zhang-04.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-06T21:02:07.000Z","updated_at":"2023-03-14T02:41:45.000Z","dependencies_parsed_at":"2022-09-11T14:01:15.186Z","dependency_job_id":null,"html_url":"https://github.com/Luke-zhang-04/CanvasPlus","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luke-zhang-04%2FCanvasPlus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luke-zhang-04%2FCanvasPlus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luke-zhang-04%2FCanvasPlus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luke-zhang-04%2FCanvasPlus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luke-zhang-04","download_url":"https://codeload.github.com/Luke-zhang-04/CanvasPlus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248495919,"owners_count":21113723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pypi","python-library","python-package","python3","tkinter-canvas"],"created_at":"2024-11-07T08:34:13.012Z","updated_at":"2025-04-11T23:33:17.781Z","avatar_url":"https://github.com/Luke-zhang-04.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cimg alt=\"logo\" src=\"https://user-images.githubusercontent.com/55749227/81359054-1769c500-90a6-11ea-8d52-541de3f3662d.png\" /\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.python.org/\"\u003e\u003cimg alt=\"forthebadge made-with-python\" src=\"http://ForTheBadge.com/images/badges/made-with-python.svg\"/\u003e\u003c/a\u003e\u003cbr/\u003e\n    \u003ca href=\"https://GitHub.com/Luke-zhang-04/CanvasPlus/releases\"\u003e\u003cimg alt=\"GitHub release\" src=\"https://img.shields.io/github/release/Luke-zhang-04/CanvasPlus?logo=GitHub\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.python.org/pypi/canvasplus\"\u003e\u003cimg alt=\"PyPI version shields.io\" src=\"https://img.shields.io/pypi/v/canvasplus.svg?logo=pypi\u0026logoColor=white\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Luke-zhang-04/CanvasPlus/blob/master/LICENSE\"\u003e\u003cimg alt=\"GitHub license\" src=\"https://img.shields.io/github/license/Luke-zhang-04/CanvasPlus\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.python.org/pypi/CanvasPlus/\"\u003e\u003cimg alt=\"PyPI pyversions\" src=\"https://img.shields.io/pypi/pyversions/CanvasPlus.svg?logo=pypi\u0026logoColor=white\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Luke-zhang-04/CanvasPlus/actions?query=workflow%3APython-package\"\u003e\u003cimg alt=\"Workflow Status\" src=\"https://github.com/luke-zhang-04/CanvasPLus/workflows/Python-package/badge.svg\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Luke-zhang-04/CanvasPlus/actions?query=workflow%3APython-package\"\u003e\u003cimg alt=\"Workflow Status\" src=\"https://img.shields.io/github/workflow/status/luke-zhang-04/CanvasPlus/Python-package?logo=python\u0026logoColor=blue\"/\u003e\u003c/a\u003e\u003cbr/\u003e\n    \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"code style\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg?logo=python\u0026logoColor=black\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://app.codacy.com/manual/luke.zhang2004/CanvasPlus?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=Luke-zhang-04/CanvasPlus\u0026utm_campaign=Badge_Grade_Dashboard\"\u003e\u003cimg alt=\"Codacy Badge\" src=\"https://api.codacy.com/project/badge/Grade/37320c28d7e348a3b378756a6da80e62\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://codeclimate.com/github/Luke-zhang-04/CanvasPlus\"\u003e\u003cimg alt=\"code maintainability\" src=\"https://img.shields.io/codeclimate/maintainability-percentage/Luke-zhang-04/CanvasPlus?logo=code-climate\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nAn improved Canvas widget for tkinter with more functionality to display graphical elements like lines or text. \n\nTkinter's Canvas widget has some limitations which are adressed in this package.\n\nSimmilar to the default tkinter Canvas widget, e.g canvas.create_rectangle, other canvas objects can be created.\n\n## Availability ##\nTo start, make sure you have CanvasPlus installed or cloned. You can do this with one of two methods.\n### Option 1: Pip ###\nPip install this package\n```\npip install CanvasPlus\n```\n### Option 2: Github ###\nDownload a zip file containing all files.\n```\ngit clone https://github.com/Luke-zhang-04/CanvasPlus.git\n```\nor\u003cbr/\u003e\nClone the latest stable Release\u003cbr/\u003e\n[![GitHub release](https://img.shields.io/github/release/Luke-zhang-04/CanvasPlus)](https://GitHub.com/Luke-zhang-04/CanvasPlus/releases/)\u003cbr/\u003e\n[![Screen Shot 2020-04-15 at 11 26 54 PM](https://user-images.githubusercontent.com/55749227/79411325-991b7680-7f70-11ea-9415-84e978fb76ca.png)](https://github.com/Luke-zhang-04/CanvasPlus/releases)\n## Importing ##\nIt is advised that you do not import the entire module.\n```python\nfrom CanvasPlus import CanvasPlus\nCanvasPlus()\n```\n```python\nimport CanvasPlus\nCanvasPlus.CanvasPlus()\n```\n\n## Usage ##\nUsage is very simple, especially for those with experience using tkinter canvas.\n\nFor complete documentation, head over the [the wiki](https://github.com/Luke-zhang-04/CanvasPlus/wiki)\n\n### Example: ###\n```python\n#Imports\nfrom CanvasPlus import CanvasPLus\nfrom tkinter import Tk, StringVar, DoubleVar\n\n#set up canvas\nroot = Tk()\ncanvas = CanvasPlus(root, width=800, height=800, background = \"white\")\ncanvas.pack()\n#create circle function\ncanvas.create_circle(300, 600, 100, fill = \"black\", outline = \"green\", width = 3)\n\n#create rounded rectangle function\ncanvas.create_round_rectangle(\n    400, 550, 500, 650, radius = 75, fill = \"blue\", outline = \"orange\", width = 5\n)   \n\n#create arrow function and rotate it to by 310 degrees clockwise\narrow = canvas.create_arrow(600, 600, 50, 50, 150, 20, fill = \"grey\", outline = \"black\")\ncanvas.rotate(arrow, 600, 600, 310, unit=\"deg\")\n\n#create a rectangle and convert it to a polygon; then rotate it by pi/4 radians (45 degrees)\nrect = canvas.create_rectangle(100, 550, 200, 650, fill = \"#f7a8c6\", width = 0)\ncanvas.clone(rect)\nrect = canvas.poly(rect)\ncanvas.rotate(rect, 150, 600, math.pi/4)\n\n#create an entry and set it's default value\ncontent = StringVar()\ncanvas.create_entry(0, 0, anchor = \"nw\", textvariable = content, fg = \"blue\", bg = \"gold\")\ncontent.set(\"This is CanvasPlus %s\" % _canvasPlusVersion)\n\n#create button to print the value in the previously cretaed entry\ncanvas.create_button(\n    5, 25, anchor = \"nw\", text = \"button\", width = 50, highlightbackground = \"red\",\n    command = lambda e = content: print(e.get())\n)\n\n#create checkbutton and toggle it\n_, checkbutton = canvas.create_checkbutton(\n    5, 50, anchor = \"nw\", bg = \"brown\", fg = \"white\", text = \"My Checkbutton\"\n)\ncheckbutton.toggle()\n\n#create a label\ncanvas.create_label(\n    5, 75, font = (\"Times\", \"24\"), fg = \"black\", bg = \"green\", text = \"By Luke-zhang-04\", anchor = \"nw\"\n)\n\n#flip example\naPrime = canvas.create_polygon(500, 10, 500, 20, 550, 25, 600, 20, 600, 10, fill = \"yellow\", outline = \"black\")\na = canvas.clone(aPrime)\ncanvas.flip(a, m = .5, b = -200)\n\ncanvas.update()\ncanvas.mainloop()\n```\n\n![demo](https://user-images.githubusercontent.com/55749227/81359089-2a7c9500-90a6-11ea-9910-710de0d39e27.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluke-zhang-04%2Fcanvasplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluke-zhang-04%2Fcanvasplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluke-zhang-04%2Fcanvasplus/lists"}