/// <summary> /// Repaints the HALCON window 'window' /// </summary> public void repaintUsingFlushGraphic(HalconDotNet.HWindow window) { int count = HObjList.Count; HObjectEntry entry; if (window != null) { HSystem.SetSystem("flush_graphic", "false"); window.ClearWindow(); // check the boundatries of the image part if ((ImgRow2 > ImgRow1) && (ImgCol2 > ImgCol1)) { window.SetPart((int)ImgRow1, (int)ImgCol1, (int)ImgRow2, (int)ImgCol2); } // set the image part to window size else { window.SetPart(0, 0, windowHeight - 1, windowWidth - 1); } mGC.stateOfSettings.Clear(); for (int i = 0; i < count; i++) { entry = ((HObjectEntry)HObjList[i]); if (entry != null) { mGC.applyContext(window, entry.gContext); window.DispObj(entry.HObj); } } addInfoDelegate(); if (roiManager != null && (dispROI == MODE_INCLUDE_ROI)) { roiManager.paintData(window); } HSystem.SetSystem("flush_graphic", "true"); window.DispLine(-1000.0, -1000.0, -1001.0, -1001.0); } }