Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas origin is off-canvas in create_<item>(). Worka #38132

Closed
newbieroy mannequin opened this issue Mar 10, 2003 · 4 comments
Closed

Canvas origin is off-canvas in create_<item>(). Worka #38132

newbieroy mannequin opened this issue Mar 10, 2003 · 4 comments

Comments

@newbieroy
Copy link
Mannequin

newbieroy mannequin commented Mar 10, 2003

BPO 700650
Nosy @facundobatista

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2005-05-30.19:31:15.000>
created_at = <Date 2003-03-10.05:17:50.000>
labels = ['expert-tkinter']
title = 'Canvas origin is off-canvas in create_<item>().  Worka'
updated_at = <Date 2005-05-30.19:31:15.000>
user = 'https://bugs.python.org/newbieroy'

bugs.python.org fields:

activity = <Date 2005-05-30.19:31:15.000>
actor = 'facundobatista'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Tkinter']
creation = <Date 2003-03-10.05:17:50.000>
creator = 'newbieroy'
dependencies = []
files = []
hgrepos = []
issue_num = 700650
keywords = []
message_count = 4.0
messages = ['15048', '15049', '15050', '15051']
nosy_count = 2.0
nosy_names = ['facundobatista', 'newbieroy']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue700650'
versions = ['Python 2.2']

@newbieroy
Copy link
Mannequin Author

newbieroy mannequin commented Mar 10, 2003

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

@newbieroy newbieroy mannequin closed this as completed Mar 10, 2003
@newbieroy newbieroy mannequin added the topic-tkinter label Mar 10, 2003
@facundobatista
Copy link
Member

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

@facundobatista
Copy link
Member

Logged In: YES
user_id=752496

There's no file attached...

@facundobatista
Copy link
Member

Logged In: YES
user_id=752496

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

. Facundo

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant