This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Canvas origin is off-canvas in create_(). Worka
Type: Stage:
Components: Tkinter Versions: Python 2.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: facundobatista, newbieroy
Priority: normal Keywords:

Created on 2003-03-10 05:17 by newbieroy, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Messages (4)
msg15048 - (view) Author: Roy Keir (newbieroy) Date: 2003-03-10 05:17
   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

msg15049 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2005-01-15 12:46
Logged In: YES 
user_id=752496

Please, could you verify if this problem persists in Python 2.3.4
or 2.4?

If yes, in which version? Can you provide a test case?

If the problem is solved, from which version?

Note that if you fail to answer in one month, I'll close this bug
as "Won't fix".

Thank you! 

.    Facundo
msg15050 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2005-01-15 12:46
Logged In: YES 
user_id=752496

There's no file attached...
msg15051 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2005-05-30 19:31
Logged In: YES 
user_id=752496

Deprecated. Reopen only if still happens in 2.3 or newer. 

.    Facundo
History
Date User Action Args
2022-04-10 16:07:30adminsetgithub: 38132
2003-03-10 05:17:50newbieroycreate