output color definition.
set_color defines the colors for region output in the active window. The available colors can be queried with the procedure query_color. The "colors" 'black' and 'white' are available for all screens. If colors are used that are not displayable on the screen, HORUS can choose a similar, displayable color ofr the output. For this, set_check(::'~color':) must be called. Furthermore, the list of available colors can be set with the procedure set_system(::'graphic_colors',...:). That must be done before opening the first output window. If only a single color is passed, all output is in this color. If a tuple of colors is passed, the output color of regions is modulo to the number of colors. In the example below, the first circle is displayed red, the second in green and the third in red again. HORUS always begins output with the first color passed. Note, that the number of output colors depends on the number of objects that are displayed in one procedure call. If only single objects are displayed, they always appear in the first color, even if the consist of more than one connected components.
The defined colors are used until set_color, set_pixel, set_rgb, set_hsi or set_grey is called again.
Colors are defined seperately for each window. They can only be changed for the active window.
Color is used in procefures with region output like disp_region, disp_line, disp_rectangle1, disp_arrow etc. It is also used by procedures with greyvalue output in certain output modes (e.g. '3D-plot','histogram', 'contourline', etc. See set_paint).
Color (input_control) |
string-array -> string |
output color names. | |
Default value: 'white' |
set_color(::['red','green']:) > disp_circle(::[100,200,300],[200,300,100],[100,100,100]:).
set_color returns TRUE, if a window is active and the passed colors are displayable on the screen. Otherwise an exceprtion is raised.
get_rgb, disp_region, set_fix, set_paint