TouchImageView.java 文件源码

java
阅读 43 收藏 0 点赞 0 评论 0

项目:PhotoPicker-master 作者:
/**
 * Return a Rect representing the zoomed image.
 *
 * @return rect representing zoomed image
 */
public RectF getZoomedRect() {
  if (mScaleType == ScaleType.FIT_XY) {
    throw new UnsupportedOperationException("getZoomedRect() not supported with FIT_XY");
  }
  PointF topLeft = transformCoordTouchToBitmap(0, 0, true);
  PointF bottomRight = transformCoordTouchToBitmap(viewWidth, viewHeight, true);

  float w = getDrawable().getIntrinsicWidth();
  float h = getDrawable().getIntrinsicHeight();
  return new RectF(topLeft.x / w, topLeft.y / h, bottomRight.x / w, bottomRight.y / h);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号