工控编程吧
标题:
工业视觉halcon图形text函数详细介绍
[打印本页]
作者:
qq263946146
时间:
2019-11-6 12:54
标题:
工业视觉halcon图形text函数详细介绍
(, 下载次数: 1)
上传
点击文件名下载附件
文本形式的变量可以用于显示一些信息,如几何测量数值,与用户的交互字符串等。
Halcon提供比较全的文本操作函数,
如下
disp_message disp_text
disp_continue_message
disp_end_of_program_message
disp_text_button
query_font set_font get_font
get_font_extents
set_display_font
get_string_extents
write_string set_tposition
get_tposition
new_line
read_char read_string
实例
dev_close_window ()
read_image (Image, 'printer_chip/printer_chip_01')
dev_open_window_fit_image (Rim, 0, 0, -1, -1, WindowHandle)
dev_display (Image)
*disp_text
set_display_font (WindowHandle, 16, 'mono', 'true', 'false')
dev_disp_text ('hello', 'image', 12, 12, 'red', ['box'], ['false'])
disp_message (WindowHandle,'gkbc8.com' , 'image', 12, 12, 'red', 'false')
disp_continue_message (WindowHandle, 'black', 'true')
disp_end_of_program_message (WindowHandle, 'black', 'true')
disp_text_button (WindowHandle, 'Text', 'window', 200, 200, 'red', 'green')
dev_clear_window ()
query_font (WindowHandle, Font)
get_font (WindowHandle, Font1)
set_font (WindowHandle, 'Arial-24')
dev_disp_text ('hello', 'image', 12, 12, 'red', ['box'], ['false'])
get_font_extents (WindowHandle, MaxAscent, MaxDescent, MaxWidth, MaxHeight)
get_string_extents (WindowHandle, 'gkbc8.com', Ascent, Descent, Width, Height)
dev_clear_window ()
write_string (WindowHandle, 12)
new_line (WindowHandle)
write_string (WindowHandle, 'gkbc8.com')
new_line (WindowHandle)
get_tposition (WindowHandle, Row, Column)
get_string_extents (WindowHandle, 'gkbc8.com', Ascent, Descent, Width, Height)
set_tposition (WindowHandle, Row+Height, Column+Width*4)
write_string (WindowHandle, 'gkbc8.com')
read_char (WindowHandle, Char, Code)
read_string (WindowHandle, '请输入密码:', 32, OutString)
帖子为视频教程部分内容,
可以下载教程学习。
[halcon]1[/halcon]
[MFC408]1[/MFC408]
[weixinlianxi]1[/weixinlianxi]
欢迎光临 工控编程吧 (https://www.gkbc8.com/)
Powered by Discuz! X3.4