Click here to Skip to main content
16,021,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, i have some problem..

I want to show images and capture the cursor position according to coordinates / pixel image coordinates not screen,,
approximately how??
please help me...
Posted

1 solution

Hi,

You would first get the touch location, which is very simple (and you probably already know how to do :-)).

Next, create a source rectangle (a rectangle that specifies part of the image), and set it to the touch position, with about the size of a finger (maybe 64x64).

Finally, you store that source rectangle, and when the user wants to see the image, you simply show the part of the image where the user pressed.

Cheers,

ge-force.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900