HImage ho_Image =new HImage ();
HRegion ho_RIO_0=new HRegion ();
HXLDCont ho_Cross = new HXLDCont();
ho_Image.ReadImage(@“C:\Users\Administrator\Desktop\Halcon代码\fabrik.jpeg”);
int height,width;
ho_Image.GetImageSize(out width,out height);
#region /**/线程调用可折叠的代码**
double ratioWidth = (1.0) * width / hWindowControl1.Width;
double ratioHeight = (1.0) * height / hWindowControl1.Height;
HTuple row1, column1, row2, column2;
if (ratioWidth >= ratioHeight)
{
row1 = (-1.0) * (hWindowControl1.Height * ratioHeight - height) / 2;
column1 = 0;
row2 = row1 + hWindowControl1.Height * ratioWidth;
column2 = column1 + hWindowControl1.Width * ratioWidth;
}
else
{
row1 = 0;
column1 = (-1.0) * (hWindowControl1.Width * ratioHeight - width)