Tk Library Source Code

View Ticket
Login
Ticket UUID: 6a0ebdd9955e69b1e44ef4a3fc552b22a584de33
Title: plotanim: bugs found while documenting the package
Type: Bug Version: trunk
Submitter: serhiy.storchaka Created on: 2026-11-21 20:49:01
Subsystem: tklib :: plotchart Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2026-11-21 20:49:01
Resolution: None Closed By: nobody
    Closed on:
Description:

These bugs were found while writing the manual page of plotanim. They occur with Tk 8.6 and 9.1.

  • ::Plotchart::anim::rectangle w point1 point2 with point2 given as the name of an object replaces the first point instead of the second (set first instead of set second): rectangle .c {0 0} centre returns rectangle 1 2 centre {}.
  • ::Plotchart::anim::morph of a circle fails with wrong # args: should be "set varName ?newValue?": the code does set newcoords $x $y.
  • ::Plotchart::anim::animate with a morphto point given as the name of an object fails with wrong # args: should be "coords w name": it calls coords $first without the canvas argument.
  • ::Plotchart::anim::morph -scaling pixel moves the item to a wrong place: the shift in pixels is converted as the scale factor divided by the shift instead of the shift divided by the factor, and the new world coordinates are then used as canvas coordinates. A line from (226,199) to (287,199) on the canvas, morphed by 10 pixels, is drawn from (6.1,8.25) to (7.1,8.25).