crm2011 部署中碰到的和SQL相关的一个问题
2010-12-16 21:55
344 查看
imageView.getImageMatrix() float[] values = new float[9]; matrix.getValues(values); matrix.getValues(values); float mtrans_x = values[Matrix.MTRANS_X];//左上顶点X坐标 float mtrans_y = values[Matrix.MTRANS_Y];//左上顶点Y坐标 float mscale_x = values[Matrix.MSCALE_X] ;//宽度缩放倍数 float mscale_y = values[Matrix.MSCALE_Y] ;//高度缩放位数 Drawable drawable = relativeImageView.getDrawable(); Rect imageBounds = drawable.getBounds(); //original height and width of the bitmap int intrinsicHeight = drawable.getIntrinsicHeight(); int intrinsicWidth = drawable.getIntrinsicWidth(); Log.i("@@@", "intrins:" + intrinsicHeight + " " + intrinsicWidth); //height and width of the visible (scaled) image int scaledHeight = imageBounds.height(); int scaledWidth = imageBounds.width(); Log.i("@@@", "bounds:" + scaledHeight + " " + scaledWidth); //Find the ratio of the original image to the scaled image //Should normally be equal unless a disproportionate scaling //(e.g. fitXY) is used. float heightRatio = intrinsicHeight / scaledHeight; float widthRatio = intrinsicWidth / scaledWidth; Log.i("@@@", "ratio:" + heightRatio + " " + widthRatio); //do whatever magic to get your touch point //MotionEvent event; //get the distance from the left and top of the image bounds float scaledImageOffsetX = event.getX() - imageBounds.left; float scaledImageOffsetY = event.getY() - imageBounds.top;
相关文章推荐
- web3部署智能合约碰到的一个奇怪问题
- 一个ActiveX 对VC 运行库的依赖以及相关部署问题
- 工作中碰到的一个问题(cookie相关)
- 推荐一个网站,碰到jenkins相关的问题,可以上去查查
- CRM 2011 中Workflow activity assembly部署的问题
- SQL的一个排序的问题
- VS2010 使用过程中碰到的一个DLL导入失败的问题
- Ubuntu16.04部署phantomjs的一个问题
- DB2 更新记录update时碰到sqlcode = 911锁表的问题
- Linq to SQL 插入数据时的一个问题
- 今天碰到一个问题,怎么限制用户在固定宽度的input输入框里输入的长度,由此涉猎到了maxlength属性和size属性以及它们的区别。
- 自己碰到的一个control +鼠标左键无效问题。
- 今天上课的时候碰到一个JS问题
- 域控制器部署在VMware ESX/ESXI中应该注意的一个问题
- SQL中碰到的问题
- Web Application 部署碰到的Transform.xml错误的问题
- ArcGIS文件(arcgis_js_api)部署相关问题总结
- 今天碰到一个强数据类型集的问题,不知道大家怎么解决呢????
- 探讨:Oracle数据库查看一个进程是如何执行相关的实际SQL语句