【转载】Halcon flush_graphic与窗口闪烁控制

解决的问题:希望让绘制的多个contour对象能够一次性显示,而不是每一个新的contour对象显示时都去刷新一次窗口。

先set_system(“flush_graphic”, “false”),之后set_system(“flush_graphic”, “true”)

read_image (Image, 'fabrik')
dev_display (Image)
* 将flush_graphic参数设置为"false"
set_system ('flush_graphic', 'false')
dev_set_color ('cyan')
gen_rectangle2_contour_xld (Rectangle, 300, 200, 0, 100.5, 20.5)
* 绘制并显示第一个contour对象Rectangle
dev_display (Rectangle)
dev_set_color ('yellow')
gen_circle_contour_xld (ContCircle, 200, 200, 100, 0, 6.28318, 'positive', 1)
* 绘制第二个contour对象 ContCircle
set_system ('flush_graphic', 'true')
* 通过一次显示,将之前绘制的多个对象同时显示出来
dev_display (ContCircle)

 【参考】https://blog.csdn.net/horsee/article/details/82981112

原文地址:https://www.cnblogs.com/xixixing/p/14307912.html