FifeImageView.java 文件源码

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

项目:FMTech 作者:
private void updateMatrix()
{
  Drawable localDrawable = getDrawable();
  float f1 = getWidth();
  float f2 = getHeight();
  if ((localDrawable == null) || (f1 == 0.0F) || (f2 == 0.0F)) {
    return;
  }
  float f3 = localDrawable.getIntrinsicWidth();
  float f4 = localDrawable.getIntrinsicHeight();
  if ((f3 <= 0.0F) || (f4 <= 0.0F)) {
    this.mMatrix.reset();
  }
  for (;;)
  {
    super.setImageMatrix(this.mMatrix);
    return;
    float f5 = Math.max(f1 / f3, f2 / f4);
    float f6 = Math.max(f3 - f1 / f5, 0.0F);
    float f7 = Math.max(f4 - f2 / f5, 0.0F);
    float f8 = f6 * this.mFocusPoint.x;
    float f9 = f6 - f8;
    float f10 = f7 * this.mFocusPoint.y;
    float f11 = f7 - f10;
    float f12 = f3 * (this.mDefaultZoom - 1.0F);
    float f13 = f4 * (this.mDefaultZoom - 1.0F);
    RectF localRectF1 = new RectF(f8 + f12 / 2.0F, f10 + f13 / 2.0F, f3 - f9 - f12 / 2.0F, f4 - f11 - f13 / 2.0F);
    RectF localRectF2 = new RectF(0.0F, 0.0F, f1, f2);
    this.mMatrix.setRectToRect(localRectF1, localRectF2, Matrix.ScaleToFit.FILL);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号