BaconographyWP8.View.ScalingGifView.CoerceScale C# (CSharp) Method

CoerceScale() public method

Coerce the scale into being within the proper range. Optionally compute the constraints on the scale so that it will always fill the entire screen and will never get too big to be contained in a hardware surface.
public CoerceScale ( bool recompute ) : void
recompute bool Will recompute the min max scale if true.
return void
        void CoerceScale(bool recompute)
        {
            if (viewport != null && _interop != null && _interop.Height != 0 && _interop.Width != 0)
            {
                var result = CoerceScaleImpl(viewport.ActualWidth, viewport.ActualHeight, _interop.Width, _interop.Height, 0.0);
                _minScale = result.Item1;
                _coercedScale = _scale = result.Item2;
            }

        }