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

CoerceScale() private 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.
private CoerceScale ( bool recompute ) : void
recompute bool Will recompute the min max scale if true.
return void
		void CoerceScale(bool recompute)
		{
            if (viewport != null && _bitmap != null && _bitmap.PixelHeight != 0 && _bitmap.PixelWidth != 0)
            {
                var result = CoerceScaleImpl(viewport.ActualWidth, viewport.ActualHeight, _bitmap.PixelWidth, _bitmap.PixelHeight, 0.0);
                _minScale = result.Item1;
                _coercedScale = _scale = result.Item2;
            }

		}