Query all color names.
::query_all_colors returns the names of all colors that are known to HALCON . That doesn't mean, that these colors are available for specific screens. On some screens there may only be a subset of colors available (see ::query_color). Before opening the first window, ::set_system can be used to define which and how many colors should be used. The HALCON colors are used to display regions (::disp_region, ::disp_polygon, ::disp_circle, etc.). They can be defined with ::set_color.
|
WindowHandle (input_control) |
window -> HTuple.long |
| Window_id. | |
|
Colors (output_control) |
string-array -> HTuple.char * |
| Color names. | |
Htuple Colors,ColorsAtWindow,WindowHandleTuple ;
create_tuple(&WindowHandleTuple,1) ;
open_window(0,0,1,1,"root","invisible","",&WindowHandle) ;
set_i(WindowHandleTuple, WindowHandle, 0) ;
T_query_all_colors(WindowHandleTuple,&Colors) ;
/* interactive selection from Colors, provide als result ActColors */
set_system("graphic_colors",ActColors) ;
T_query_color(WindowHandleTuple,&ColorsAtWindow) ;
close_window(WindowHandle) ;
for (i=0; i<length_tuple(ColorsAtWindow); i++)
printf("Color #%s = %s\n",i,get_s(ColorsAtWindow,i)) ;
::query_all_colors always returns H_MSG_TRUE
::set_system, ::set_color, ::disp_region
::query_color, ::set_system, ::set_color, ::disp_region, ::open_window, ::open_textwindow
System