コード例 #1
0
 /// <summary>
 /// 适应窗口显示图像
 /// </summary>
 /// <param name="t_image">要显示的图像</param>
 /// <param name="overWrite">是否覆盖当前窗口图像</param>
 public void DispImageFit(HObject t_image, bool overWrite = true)
 {
     hWindowHandle.DispImageFit(t_image);
     //if (t_image != null && hWindowHandle != null)
     //{
     //    try
     //    {
     //        if (t_image.CountObj() == 0)
     //        {
     //            return;
     //        }
     //        if (overWrite)
     //        {
     //            if (ho_image != null) ho_image.Dispose();
     //            HOperatorSet.CopyImage(t_image, out ho_image);
     //        }
     //        HTuple width, height;
     //        HOperatorSet.GetImageSize(t_image, out width, out height);
     //        imageWidth = width[0].I;
     //        imageHeight = height[0].I;
     //        HOperatorSet.SetPart(hWindowHandle, 0, 0, imageHeight, imageWidth);
     //        current_beginRow = 0;
     //        current_beginCol = 0;
     //        current_endRow = imageHeight;
     //        current_endCol = imageWidth;
     //        HOperatorSet.DispObj(t_image, hWindowHandle);//显示图像
     //    }
     //    catch
     //    { }
     //}
 }