解决的问题:希望让绘制的多个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)

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

 

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

相关文章:

  • 2021-10-28
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-10-12
猜你喜欢
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案