android.graphics.Camera图片绕X,Y,Z轴旋转
来源:互联网 发布:重庆卓越精算软件 编辑:程序博客网 时间:2024/04/29 03:52
public class MainActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ImageView imageView; Matrix mMatrix = new Matrix(); imageView = (ImageView) findViewById(R.id.myimage);Bitmap bmp = ((BitmapDrawable) getResources().getDrawable(R.drawable.icon_150_380882090)).getBitmap();Camera camera = new Camera();camera.save();camera.rotateY(50f);//camera.rotateX(50f);//camera.rotateZ(50f);camera.getMatrix(mMatrix);camera.restore();Bitmap bm = Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(),bmp.getHeight(), mMatrix, true);imageView.setImageBitmap(bm); }}
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/icon_150_380882090"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="下图是改变后的效果" /> <ImageView android:id="@+id/myimage" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/icon_150_380882090"/></LinearLayout>
转帖:http://abc20899.iteye.com/blog/1088752
- android.graphics.Camera图片绕X,Y,Z轴旋转
- Android X轴Y轴Z轴旋转
- iOS中控件旋转:绕x,y,z轴
- Unity 控制物体绕x,y,z 轴旋转
- trimesh2沿x、y、z轴旋转
- 《Android Y轴旋转动画Animation》 X轴 Y轴 Z轴
- android matrix camera处理图片绕X轴Y轴翻转(类似3D效果)
- android matrix camera处理图片绕X轴Y轴翻转(类似3D效果)
- Android matrix camera处理图片绕X轴Y轴翻转(类似3D效果)
- Android matrix camera处理图片绕X轴Y轴翻转(类似3D效果)
- 安卓开发——详解camera.rotate(x,y,z);的旋转方向
- x/y/z轴
- Android立体旋转动画实现与封装(支持以X、Y、Z三个轴为轴心旋转)
- Android 图片处理之-->android.graphics.Camera实现图像的旋转、缩放
- vtk 笔记 --- 图片的X与Y轴变换,旋转
- x > y ? y : x > z ? z : x;
- [cnblogs镜像]Unity 围绕X、Y、Z旋转图例
- android之绕Y轴旋转
- 文件上传的实现
- 运行时总是自动进入DEBUG的情况。
- label的作用
- oracle常见知识解答
- Pod2g已发现可完美越狱iOS 5的漏洞
- android.graphics.Camera图片绕X,Y,Z轴旋转
- 基于Chrome开源提取的界面开发
- linux Shell编程入门 实例讲解详解
- MIPS中断/异常处理机制/系统调用
- Unable to obtain requested locks during BeginAccess
- ERP系统慎选SQL SERVER 2008版本
- JDK环境变量
- MapXtreme2004初学者资料(整理)--有些功能很有价值
- .net Reflector 比较有用的东东。