适配屏幕分辨率 直接上代码:参考注释 最后,欢迎大家一起交流学习:微信:liaosy666 ; QQ:2209115372 。
public static Rect calRealSceenRect(Rect rectFace, int width, int height, int rotation ,Boolean isBackCamera) { int oriention; oriention = rotation / 90; Rect rect = new Rect(rectFace); for (int i = 0; i < oriention; i++) { for (int j = 0; j < 4; j++) { int tempt = rect.top; rect.top = rect.right; rect.right = rect.bottom; rect.bottom = rect.left; rect.left = tempt; } } //0 横屏 对应竖屏 int tempt = rect.top; rect.top = rect.left; rect.left = rect.bottom; rect.bottom = rect.right; rect.right = tempt; //前置 需要镜像 if (!isBackCamera){ int tempMirror=rect.top; rect.top=rect.bottom; rect.bottom=tempMirror; } //计算实际宽高的高度差 就转化完成android的标准坐标系。 rect.left = height - rect.left; rect.right = height - rect.right; if (!isBackCamera) { rect.top = width - rect.top; rect.bottom = width - rect.bottom; } return rect; }
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox网页视频下载器 下载地址: ImovieBox网页视频下载器-最新版本下载
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
阅读和此文章类似的: 全球云计算