Skip to content

set_rgbSetRgbSetRgbset_rgbT_set_rgbπŸ”—

Short descriptionπŸ”—

set_rgbSetRgbSetRgbset_rgbT_set_rgb β€” Set the color definition via RGB values.

SignatureπŸ”—

set_rgb( window WindowHandle, integer Red, integer Green, integer Blue )void SetRgb( const HTuple& WindowHandle, const HTuple& Red, const HTuple& Green, const HTuple& Blue )static void HOperatorSet.SetRgb( HTuple windowHandle, HTuple red, HTuple green, HTuple blue )def set_rgb( window_handle: HHandle, red: MaybeSequence[int], green: MaybeSequence[int], blue: MaybeSequence[int] ) -> None

Herror T_set_rgb( const Htuple WindowHandle, const Htuple Red, const Htuple Green, const Htuple Blue )

void HWindow::SetRgb( const HTuple& Red, const HTuple& Green, const HTuple& Blue ) const

void HWindow::SetRgb( Hlong Red, Hlong Green, Hlong Blue ) const

void HWindow.SetRgb( HTuple red, HTuple green, HTuple blue )

void HWindow.SetRgb( int red, int green, int blue )

DescriptionπŸ”—

set_rgbSetRgb sets the output color(s) or the gray values, respectively, for region output for the window. The colors are defined with the red, green and blue components. If only one combination is passed, all output takes place in that color. If a tuple is passed, region output and output of geometric objects takes place modulo the passed colors.

For every call of an output operator, output is started with the first color. If only one object is displayed per call, it will always be displayed in the first color. This is even true for objects with multiple connection components. If multiple objects are displayed per operator call, multiple colors are used. The defined colors are used until set_colorSetColor, set_rgbSetRgb or set_graySetGray is called again. The values are used by operators like disp_regionDispRegion, disp_lineDispLine, disp_rectangle1DispRectangle1, disp_rectangle2DispRectangle2, disp_arrowDispArrow, etc.

AttentionπŸ”—

If a passed color is not available, an exception is raised. If texttt{set_check(::’~color’:)} was called before, HALCON uses a similar color and suppresses the error.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

WindowHandlewindowHandlewindow_handle (input_control) window β†’ (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Redredred (input_control) integer(-array) β†’ (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Red component of the color.

Default: 255255
Value range: 0 ≀ Red ≀ 255

Greengreengreen (input_control) integer(-array) β†’ (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Green component of the color.

Default: 00
Value range: 0 ≀ Green ≀ 255

Blueblueblue (input_control) integer(-array) β†’ (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Blue component of the color.

Default: 00
Value range: 0 ≀ Blue ≀ 255

ResultπŸ”—

set_rgbSetRgb returns 2 (H_MSG_TRUE) if the window is valid and all passed colors are available and displayable. Otherwise an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible successors

disp_imageDispImage, disp_regionDispRegion

Alternatives

set_hsiSetHsi, set_colorSetColor, set_graySetGray

See also

disp_regionDispRegion

ModuleπŸ”—

Foundation