Click here to Skip to main content
13,000,127 members (62,375 online)
Rate this:
Please Sign up or sign in to vote.
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 31-May-11 22:51pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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.



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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170624.1 | Last Updated 28 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100