如何旋转触摸图像 [英] How to rotate an image on touch

查看:72
本文介绍了如何旋转触摸图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试开发一个具有像图像一样的旋转拨盘的应用程序,我需要在触摸时旋转它.

我尝试搜索,但是发现了很多复杂的方程式,这些方程式我无法弄清:(

谁能帮助我:(

Hi,

i m trying to develop an application that has a rotary dial like image and i need to rotate it on touch.

i tried searching but got a lot of complex equations which i cant figure out :(

can anybody help me :(

推荐答案

本文可以根据您的需要进行修改; ^ ].

希望这会有所帮助,
Fredrik
This article can be adapted to do what you want; Simple Gestures on Android[^].

Hope this helps,
Fredrik


我仍在尝试解决上述问题..
在PostTranslate下面的代码中不会对位图进行任何更改..
请帮我弄错地方:''(

i am still trying with the above problem..
in the Code below the PostTranslate does not create any change to the bitmap..
kindly help as to where i am goin wrong :''(

Matrix nwMat = new Matrix();
nwMat.postTranslate(200,200);
        Bitmap redrawnBitmap1 = Bitmap.createBitmap(bitmap1, 0, 0, bitmap1.getWidth(), bitmap1.getHeight(), nwMat, true);
        ServerImage.setImageBitmap(redrawnBitmap1);  


这篇关于如何旋转触摸图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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