Translating pixel postion?
-
So ive got a bitmap image of say size 1000*500 and use it as the background image of the form with layout property set to Stretch, now if user clicks on the form i want to be able to get the pixel postion of original image and not the x/y of the form beacuse that image is stretched? is this even possible?:confused:
-
So ive got a bitmap image of say size 1000*500 and use it as the background image of the form with layout property set to Stretch, now if user clicks on the form i want to be able to get the pixel postion of original image and not the x/y of the form beacuse that image is stretched? is this even possible?:confused:
-
You can't, if the image is being displayed smaller then it really is as a background, it has only has as many pixels as the form does. A pixel is a uniform size. See this if you don't get what I'm saying.
modified on Saturday, December 19, 2009 8:46 PM
I get what you are saying, but i thought we could solve this by doing some math, which i completely suck at :^) I have seen some vnc client do something similar to this, it has an option to autoscale/stretch the client view to any size but yet it can translate the current mouse location to original screen coordinates :confused:
-
I get what you are saying, but i thought we could solve this by doing some math, which i completely suck at :^) I have seen some vnc client do something similar to this, it has an option to autoscale/stretch the client view to any size but yet it can translate the current mouse location to original screen coordinates :confused:
-
One thing to consider would be figuring out what percentage into the image the position is horizontally and vertically and then placing the point at the same percentage in on the larger image. not 100% sure it will work but it works in my head at least.