[issue42992] Tkinter bbox coordinates incorrectly drawn

2021-01-21 Thread Ron Hoffmann


New submission from Ron Hoffmann :

position coordinates retrieved from any object on a canvas with
pos = canvas.bbox(object) are returned correctly

but when drawn on the canvas (x0,y0) are correct, but
(x1, y1) are not drawn in the proper positions. x1 has been divided by 2 
somewhere and y1 as been multiplied by 2 somewhere.
in order for the bounding box to be drawn correctly
x1 and y1 need to be recalculated as follows

x1 = pos[0] + ( ( pos[2] - pos[0] ) * 2 )
y1 = pos[1] + ( ( pos[3] - pos[1] ) / 2 )

--
components: Tkinter
messages: 385446
nosy: rhoffmann
priority: normal
severity: normal
status: open
title: Tkinter bbox coordinates incorrectly drawn
type: behavior
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue42992>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42992] Tkinter bbox coordinates incorrectly drawn

2021-01-22 Thread Ron Hoffmann


Ron Hoffmann  added the comment:

Thank you for your response. I have been fighting this issue in a large piece 
of code for quite some time.
So I wrote a small test script as you asked for and the problem will not 
reproduce. All behaviour of code is as expected.
I must therefore assume there is no bug in tkinter and the problem lies in my 
code or with my development environment.
Please consider the issue closed

--
resolution:  -> not a bug

___
Python tracker 
<https://bugs.python.org/issue42992>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com