在Windows Phone XNA中显示图像 [英] display image in windows phone xna

查看:91
本文介绍了在Windows Phone 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...

推荐答案



首先,您将获得触摸位置,这非常简单(并且您可能已经知道该怎么做:-)).

接下来,创建一个源矩形(指定图像一部分的矩形),并将其设置为大约手指大小(也许是64x64)的触摸位置.

最后,存储该源矩形,当用户希望查看图像时,只需显示用户按下的图像部分即可.

干杯,

ge-force.
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.


这篇关于在Windows Phone XNA中显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆