PhotoView icon indicating copy to clipboard operation
PhotoView copied to clipboard

fitcenter无效呢~~

Open liaohuyu opened this issue 7 years ago • 1 comments

~~如题

liaohuyu avatar Feb 07 '18 09:02 liaohuyu

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();
}

改成这样 似乎能行了~~ 不知道有啥毛病没 知道的老铁指出一下

liaohuyu avatar Feb 07 '18 09:02 liaohuyu