[Python-bugs-list] [ python-Bugs-700651 ] Canvas origin is off-canvas in create_<item>(). Workaround

SourceForge.net noreply@sourceforge.net
Sun, 09 Mar 2003 21:20:20 -0800


Bugs item #700651, was opened at 2003-03-09 22:20
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=700651&group_id=5470

Category: Tkinter
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Roy Keir (newbieroy)
Assigned to: Nobody/Anonymous (nobody)
Summary: Canvas origin is off-canvas in create_<item>().  Workaround 

Initial Comment:
   The origin for x,y pairs sent to the Canvas items is off-screen by the sum of borderwidth bd and 
highlightthickness hT.  The accompanying program shows this and includes three functions which can be 
used in workarounds.  I just hope the upload facility works this time.
   A canvas with exaggerated values for bd and hT is shown to illustrate the problem.  On it, a full-screen 
open rectangle ((0-to width-1) by 0-to-(height-1)) is shown in red, and it is partly off-screen.  A blue 
rectangle of the same coordinates is sent through UsrToCnv(), which uses .cget() to fetch up-to-date 
values for bd and hT (which can of course be updated on the fly) and translates the user's canvas item 
back where it belongs.
   Clicking on the canvas illustrates the use of CnvToUsr, sending a tuple (event.x, event.y) through the 
reverse of the above translation so that it matches the user's expectations.
   If these functions or their equivalents are not already available, you have my permission to offer these 
as workarounds while someone investigates the problem.

   I recommend that similar trials be performed on Tcl/Tk or PERL/Tk to see if the problem lies in Tkinter 
or even deeper in the mass of code.

   I'm a Python beginner so can't help with a project to fix it, but I'd like to be kept informed of any 
progress or decisions, if that's not too much trouble.

Roy Keir




ps I got the "no data in the file" message again.

If you will send me another URL or give me a PO address, I'll send the file by that more reliable path

fyi, I use Netscape 4.7  Does that correlate with upload failures ?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=700651&group_id=5470