Open liaohuyu opened 6 years ago
private void initFitCenter() { /* if (mImgRect.width() < mWidgetRect.width()) { mScale = mWidgetRect.width() / mImgRect.width();
mAnimaMatrix.postScale(mScale, mScale, mScreenCenter.x, mScreenCenter.y);
executeTranslate();
resetBase();
}*/
float scaleX = mWidgetRect.width() / mImgRect.width();
float scaleY = mWidgetRect.height() / mImgRect.height();
mScale = scaleX < scaleY ? scaleX : scaleY;
mAnimaMatrix.postScale(mScale, mScale, mScreenCenter.x, mScreenCenter.y);
executeTranslate();
resetBase();
}
改成这样 似乎能行了~~ 不知道有啥毛病没 知道的老铁指出一下
~~如题