Message385446
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 ) |
|
Date |
User |
Action |
Args |
2021-01-21 20:56:49 | rhoffmann | set | recipients:
+ rhoffmann |
2021-01-21 20:56:49 | rhoffmann | set | messageid: <1611262609.83.0.00898948617335.issue42992@roundup.psfhosted.org> |
2021-01-21 20:56:49 | rhoffmann | link | issue42992 messages |
2021-01-21 20:56:49 | rhoffmann | create | |
|