Bubbles3/Controls/BblImageSurface.cs
/// <summary>
/// Set the scale matrix so the image fits within the client area
/// </summary>
Set the scale matrix so the image fits within the client area
Set the scale matrix so the image fits within the client area
public void Fit()
        {
            float xratio = (float)ClientSize.Width / (float)ImgSize.Width;
            float yratio = (float)ClientSize.Height / (float)ImgSize.Height;
            float zf = Math.Min(xratio, yratio);
            _scale = Matrix3x2.Scaling(zf, zf, ImgCenter);
            UpdateRenderParams();
        }
public void Fit ( ) { float xratio = ( float ) ClientSize . Width / ( float ) ImgSize . Width ; float yratio = ( float ) ClientSize . Height / ( float ) ImgSize . Height ; float zf = Math . Min ( xratio , yratio ) ; _scale = Matrix3x2 . Scaling ( zf , zf , ImgCenter ) ; UpdateRenderParams ( ) ; }
Set the scale matrix so the image fits within the client area
Set the scale matrix so the image fits within the client area