- #1
tonytj
- 1
- 0
How do I transform my x, y values into screen coordinates system
All values is in pixels
In my coordinate system origo is located in (40,495)
The display area that I can use is from X=40 to x=750 and
from y=495 to y=55
When you go down in the coordinate system the y value is increasing and when
you go to the right
the x value is increasing.
The y-axis is showing time from 12:00 to 20:00 and the x-axis is distance
showing from 0 to 800
So I can have values like
[13:10, 190]
[13:40, 240]
[14:25, 390]
[15:10, 431]
[16:10, 554]
[17:10, 643]
[18:10, 740]
I just wonder if someone has a algoritm that I can use to transform my
values into this coordinate system.
//Tony
All values is in pixels
In my coordinate system origo is located in (40,495)
The display area that I can use is from X=40 to x=750 and
from y=495 to y=55
When you go down in the coordinate system the y value is increasing and when
you go to the right
the x value is increasing.
The y-axis is showing time from 12:00 to 20:00 and the x-axis is distance
showing from 0 to 800
So I can have values like
[13:10, 190]
[13:40, 240]
[14:25, 390]
[15:10, 431]
[16:10, 554]
[17:10, 643]
[18:10, 740]
I just wonder if someone has a algoritm that I can use to transform my
values into this coordinate system.
//Tony