登录
首页 » Android » Android 使用Matrix.postRotate方法旋转图片

Android 使用Matrix.postRotate方法旋转图片

于 2022-03-14 发布 文件大小:32.93 kB
0 285
下载积分: 2 下载次数: 1

代码说明:

Android图像操作一例,使用Matrix.postRotate方法旋转图片,这些的图片格式是BMP,其它格式可能也能用吧,没测试,旋转BMP图片的效果如截图所示,用户单击向左或向右按钮后,图片旋转90度,旋转角度根据自己需要自定义。旋转方法主要是使用Matrix.postRotate,旋转的过程保持图片原有的比例,实现思路,以向左旋转图片为例:   程序刚运行,加载默认的Drawable ,设置维持的图像比例,ScaleTimes=1,维持1:1的宽高比例,使用Matrix.postScale设置维度 ,使用Matrix.postRotate方法旋转Bitmap,然后再创建新的Bitmap对象。   向右旋转则与此相似,具体实现请下载源码包。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • lcIPC_SurfaceView
    surface,H264,解码,显示,网络流,播放(surface, H264)
    2013-08-06 10:18:16下载
    积分:1
  • Client-Service-json
    Android C/s 模式的手机客户端与服务器端的json数据传输,内含有大量知识点。(Json data transfer mobile client and server-side Android C/s mode, which contains a lot of knowledge.)
    2014-05-19 14:13:01下载
    积分:1
  • finalassignment
    android 移动应用系统设计 1、最后提交两部分内容 a. 对一个功能的实现+实验报告(该项作为平时作业成绩) - 可以选择上课中所演示的任意功能,截图完成实验报告 - 需要提交程序 + 3-5页的实验报告 b. 从以下网址下载一个app源码,或者其它地方的源码,对代码进行详细解析(该项作为期末课程考核成绩) - 推荐下载网址为:http://www.devstore.cn/code/list/pn1-or0.html - 需要提交下载的源码,和对该源码实现的分析报告,不少于8页 2、将所有内容按下面两个目录进行存放,打包以“学号+姓名” 命名,上传到作业ftp - 实验 - 课程综合(android mobile application system design 1, the final submission of two parts a test report achieve+ a function (such as the usual job performance)- You can any function demonstrated in class, theme complete test report- to be submitted program+ Experimental report b 3-5 pages downloaded the following URL an app source code, or elsewhere source, detailed analysis of the code (such as the end of course examination results)- Recommended download site at: http: //www.devstore .cn/code/list/pn1-or0.html- to submit to download the source code, and analysis of the source code to achieve, at least 8 2, all the content stored in the following two directories, packed to " learn No.+ name " name, upload to job ftp- Experiment- Integrated Course)
    2015-11-17 10:36:12下载
    积分:1
  • src
    使用百度地图和定位SDK做的简单示例代码,鹰眼轨迹部分还没有完全完成,先上传这部分,由于文件过大,只上传src部分,百度SDK官网上均下载链接(Using Baidu Map and Location SDK to do a simple example code, the Eagle Eye Track part has not been fully completed, first upload this part, because the file is too large, only upload the SRC part, Baidu SDK official website are downloaded links.)
    2020-06-21 14:20:02下载
    积分:1
  • Android.doc
    android 开发工具指南,里面有对安卓系统的介绍,文档不错,可以当作安卓开发的补充知识。(android tutorial)
    2013-07-02 20:47:02下载
    积分:1
  • Android连连看源码
    Android连连看源码,一款可以允许在android手机上的连连看游戏,附带源码                                          
    2023-03-08 17:05:04下载
    积分:1
  • 安卓图片浏览器
    提供几十种图像渲染/图像滤镜效果,包括像素级别的渲染,或者给图像蒙上特殊的蒙板效果。缺点是渲染速度不太好,还需要进一步改进。
    2022-03-26 13:08:14下载
    积分:1
  • 支付密码框,类似微信支付
    简单易懂的密码键盘,使用布局写成键盘,用圆点图片代替密码效果,通过接口回调的方式获取密码字符串。通过枚举配合view的点击事件将值存在List集合里面,然后根据长度刷新UI。可以通过修改源码达到你自己要的效果,代码中也做了注释,应该是比较容易看懂的
    2022-06-27 02:46:06下载
    积分:1
  • Android.chm
    这个是在网上看到的android帮助文档 看了一些觉得还是挺有用的 所以上传共享下 (android can help you to easy understand )
    2011-05-14 21:02:56下载
    积分:1
  • AppWidgetHostView
    Provides the glue to show AppWidget views for Andriod.
    2013-10-17 22:12:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载