HALCON Reference Manual 10.0.2
Table of Contents / Graphics / Parameters ClassesClassesClasses | | | Operators

set_rgbset_rgbset_rgbSetRgbSetRgb (Operator)

Name

set_rgbset_rgbset_rgbSetRgbSetRgb — Set the color definition via RGB values.

Signature

set_rgb( : : WindowHandle, Red, Green, Blue : )

Herror set_rgb(const Hlong WindowHandle, const Hlong Red, const Hlong Green, const Hlong Blue)

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

Herror 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 HOperatorSetX.SetRgb(
[in] VARIANT WindowHandle, [in] VARIANT Red, [in] VARIANT Green, [in] VARIANT Blue)

void HWindowX.SetRgb(
[in] VARIANT Red, [in] VARIANT Green, [in] VARIANT Blue)

static void HOperatorSet.SetRgb(HTuple windowHandle, HTuple red, HTuple green, HTuple blue)

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

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

Description

set_rgbset_rgbset_rgbSetRgbSetRgb 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_colorset_colorset_colorSetColorSetColor, set_pixelset_pixelset_pixelSetPixelSetPixel, set_rgbset_rgbset_rgbSetRgbSetRgb or set_grayset_grayset_graySetGraySetGray is called again. The values are used by operators like disp_regiondisp_regiondisp_regionDispRegionDispRegion, disp_linedisp_linedisp_lineDispLineDispLine, disp_rectangle1disp_rectangle1disp_rectangle1DispRectangle1DispRectangle1, disp_rectangle2disp_rectangle2disp_rectangle2DispRectangle2DispRectangle2, disp_arrowdisp_arrowdisp_arrowDispArrowDispArrow, etc.

Attention

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

Parallelization

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Window_id.

RedRedRedRedred (input_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Red component of the color.

Default value: 255

Typical range of values: 0 ≤ Red Red Red Red red ≤ 255

Restriction: (0 <= Red) && (Red <= 255)

GreenGreenGreenGreengreen (input_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Green component of the color.

Default value: 0

Typical range of values: 0 ≤ Green Green Green Green green ≤ 255

Restriction: (0 <= Green) && (Green <= 255)

BlueBlueBlueBlueblue (input_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Blue component of the color.

Default value: 0

Typical range of values: 0 ≤ Blue Blue Blue Blue blue ≤ 255

Restriction: (0 <= Blue) && (Blue <= 255)

Result

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

Possible Successors

disp_imagedisp_imagedisp_imageDispImageDispImage, disp_regiondisp_regiondisp_regionDispRegionDispRegion

Alternatives

set_hsiset_hsiset_hsiSetHsiSetHsi, set_colorset_colorset_colorSetColorSetColor, set_grayset_grayset_graySetGraySetGray

See also

set_fixset_fixset_fixSetFixSetFix, disp_regiondisp_regiondisp_regionDispRegionDispRegion

Module

Foundation


Table of Contents / Graphics / Parameters ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH