Skip to content

gh-151876: Add tkinter Canvas methods rotate and rchars#151877

Merged
serhiy-storchaka merged 4 commits into
python:mainfrom
serhiy-storchaka:tkinter-canvas-rotate-rchars
Jun 22, 2026
Merged

gh-151876: Add tkinter Canvas methods rotate and rchars#151877
serhiy-storchaka merged 4 commits into
python:mainfrom
serhiy-storchaka:tkinter-canvas-rotate-rchars

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 21, 2026

Copy link
Copy Markdown
Member

Wrap two Tk canvas widget commands that previously had no tkinter wrapper and were reachable only through tk.call().

  • Canvas.rchars() wraps rchars (since Tk 8.6): it replaces the characters (for text items) or coordinates (for line and polygon items) in a given index range with a new value, complementing the existing :meth:!dchars and :meth:!insert methods.
  • Canvas.rotate() wraps rotate (new in Tk 9.0): it rotates the coordinates of items about an origin by a given angle (anticlockwise; negative values rotate clockwise), complementing the existing :meth:!move and :meth:!scale methods.

rchars is tested on Tk 8.6 and newer; rotate is covered by a test gated on @requires_tk(9, 0).

🤖 Generated with Claude Code

@read-the-docs-community

read-the-docs-community Bot commented Jun 21, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33249859 | 📁 Comparing b6710b4 against main (30aeeb3)

  🔍 Preview build  

6 files changed · ± 6 modified

± Modified

Wrap the Tk canvas commands "rchars" (replace the text or coordinates of
items, since Tk 8.6) and "rotate" (rotate the coordinates of items about
an origin, new in Tk 9.0) as the methods Canvas.rchars() and
Canvas.rotate(), complementing the existing dchars/insert and move/scale
methods.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XWevzas4XVpjzedzR9gKVo
@serhiy-storchaka serhiy-storchaka force-pushed the tkinter-canvas-rotate-rchars branch from ca2d8e0 to 41fba5b Compare June 21, 2026 22:23
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) June 22, 2026 11:47
@serhiy-storchaka serhiy-storchaka merged commit b9bceb1 into python:main Jun 22, 2026
51 checks passed
@serhiy-storchaka serhiy-storchaka deleted the tkinter-canvas-rotate-rchars branch June 22, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant