Tkinter's coordinates setting
Shi Mu
samrobertsmith at gmail.com
Thu Nov 17 19:10:27 EST 2005
On 11/17/05, Steve Juranich <sjuranic at gmail.com> wrote:
> 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
why subtract 1 from max_y - original_y?
More information about the Python-list
mailing list