Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows-Phone-7 XNA
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 23:51pm
fithri487

1 solution

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

Solution 1

Hi,
 
You would first get the touch location, which is very simple (and you probably already know how to do Smile | :) ).
 
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 464
1 Sergey Alexandrovich Kryukov 429
2 Maciej Los 285
3 CPallini 180
4 Peter Leow 170
0 Sergey Alexandrovich Kryukov 6,971
1 OriginalGriff 5,532
2 Peter Leow 3,997
3 Mika Wendelius 2,850
4 CHill60 2,808


Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 28 Jan 2012
Copyright © CodeProject, 1999-2015
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