Tkinter's coordinates setting

Steve Juranich sjuranic at gmail.com
Thu Nov 17 17:32:51 EST 2005


On 11/17/05, Ben Bush <pythonnew at gmail.com> wrote:
> Tkinter's coordinates setting are: the left upper corner is the smallest X
> and Y, which is different from our usual think that Y is largest in that
> location. If i draw some lines on the canvas and show some relationship
> among them, do I need transfer the coordinates?

Transfer the coordinates of what?

When you go from the standard right-handed system to the system used
in computer graphics, you use these simple formulas:

max_x, max_y = image size
screen_x = original_x
screen_y = max_y - original_y - 1

HTH
--
Steve Juranich
Tucson, AZ
USA



More information about the Python-list mailing list