I am writing a program that converts the screen mapped pixels to actual resolution. As an example on the screen the co-ordinates are from (0,0) [top left] to (1,1) [bottom right]. My computer monitor has the resolution of 1600×900. So i need a way to map (0,0) to (0X0) and (1,1) to (1600×900) as well as everything in between such as (0.56,0.7) to Whatever it translates to in resolution. Does anyone know a way to do this?
I am writing a program that converts the screen mapped pixels to actual resolution.
Share
You just need to scale them like this:
To go from actual to co-ordinates:
so in your example, using a y-coordinate of 0.333
To go from co-ordinates to actual:
so in your example, using a y-coordinate of 300