在HDevelop中
dev_update_off() dev_open_window(10,10,500,500,'black',WindowHandle) draw_xld (ContOut, WindowHandle, 'true', 'true', 'true', 'true') *手绘轮廓 gen_region_contour_xld (ContOut, Region, 'filled') *轮廓转化成区域 *参数1:轮廓 *参数2:区域 *参数3:区域的填充模式 * 'filled' * 'margin' dev_display (ContOut) dev_open_window(10,100,500,500,'black',WindowHandle1) dev_display (Region)
在QtCreator中
HObject ho_ContOut, ho_Region;
HTuple hv_WindowHandle, hv_WindowHandle1;
SetWindowAttr("background_color","black"); OpenWindow(10,10,500,500,0,"visible","",&hv_WindowHandle); HDevWindowStack::Push(hv_WindowHandle); DrawXld(&ho_ContOut, hv_WindowHandle, "true", "true", "true", "true"); //手绘轮廓 GenRegionContourXld(ho_ContOut, &ho_Region, "filled"); //轮廓转化成区域 //参数1:轮廓 //参数2:区域 //参数3:区域的填充模式 // 'filled' // 'margin' if (HDevWindowStack::IsOpen()) DispObj(ho_ContOut, HDevWindowStack::GetActive()); SetWindowAttr("background_color","black"); OpenWindow(10,100,500,500,0,"visible","",&hv_WindowHandle1); HDevWindowStack::Push(hv_WindowHandle1); if (HDevWindowStack::IsOpen()) DispObj(ho_Region, HDevWindowStack::GetActive());