PhotoViewerTest.Droid.PhotoViewDroidAttacher.CheckAndDisplayMatrix C# (CSharp) Method

CheckAndDisplayMatrix() private method

private CheckAndDisplayMatrix ( ) : void
return void
        private void CheckAndDisplayMatrix()
        {
            if (CheckMatrixBounds()) {
                SetImageViewMatrix(GetDrawMatrix());
            }
        }

Usage Example

            public void Run()
            {
                ImageView imageView = photoViewAttacher.GetImageView();

                if (imageView == null)
                {
                    return;
                }

                float t          = Interpolate();
                float scale      = mZoomStart + t * (mZoomEnd - mZoomStart);
                float deltaScale = scale / photoViewAttacher.GetScale();

                photoViewAttacher.mSuppMatrix.PostScale(deltaScale, deltaScale, mFocalX, mFocalY);
                photoViewAttacher.CheckAndDisplayMatrix();

                // We haven't hit our target scale yet, so post ourselves again
                if (t < 1f)
                {
                    Compat.PostOnAnimation(imageView, this);
                }
            }