ClassesClassesClassesClasses | | | | Operators

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

dev_set_coloreddev_set_coloredDevSetColoreddev_set_coloredDevSetColoredDevSetColored (Operator)

Name

dev_set_coloreddev_set_coloredDevSetColoreddev_set_coloredDevSetColoredDevSetColored — Set multiple output colors.

Signature

dev_set_colored( : : NumColors : )

Herror dev_set_colored(const Hlong NumColors)

Herror T_dev_set_colored(const Htuple NumColors)

Herror dev_set_colored(const HTuple& NumColors)

void HWindow::DevSetColored(const HTuple& NumColors) const

void DevSetColored(const HTuple& NumColors)

static void HWindow::DevSetColored(Hlong NumColors)

void HOperatorSetX.DevSetColored([in] VARIANT NumColors)

void HWindowX.DevSetColored([in] Hlong NumColors)

static void HOperatorSet.DevSetColored(HTuple numColors)

static void HWindow.DevSetColored(int numColors)

Description

dev_set_coloreddev_set_coloredDevSetColoreddev_set_coloredDevSetColoredDevSetColored allows to display tuples of regions, XLDs, and other geometrical objects in the graphics windows in different colors using a set of NumColorsNumColorsNumColorsNumColorsNumColorsnumColors predefined colors. Valid values for NumColorsNumColorsNumColorsNumColorsNumColorsnumColors can be queried with the operator query_coloredquery_coloredQueryColoredquery_coloredQueryColoredQueryColored.

For more information see the description of the operator set_coloredset_coloredSetColoredset_coloredSetColoredSetColored. However, in contrast to that operator the color setting is also used for all new graphics windows that are opened afterwards.

These color settings remain valid until dev_set_colordev_set_colorDevSetColordev_set_colorDevSetColorDevSetColor or dev_set_coloreddev_set_coloredDevSetColoreddev_set_coloredDevSetColoredDevSetColored is called or until the color setting are modified interactively.

Attention

Using the code export feature of HDevelop, the code that is generated for this operator may have a different behavior than the related HALCON operator. For a detailed description of the code export of HDevelop graphics operators into the different programming languages see in the “HDevelop User's Guide” the chapter Code Export -> General Aspects of Code Generation -> Graphics Windows.

Parameters

NumColorsNumColorsNumColorsNumColorsNumColorsnumColors (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of output colors.

Default value: 6

List of values: 3, 6, 12

Example (HDevelop)

read_image(Image,'monkey')
threshold(Image,Region,128,255)
dev_set_colored(6)
connection(Region,Regions)

Result

If the values of the specified parameters are correct, dev_set_coloreddev_set_coloredDevSetColoreddev_set_coloredDevSetColoredDevSetColored returns 2 (H_MSG_TRUE). Otherwise an exception is raised and an error code returned.

Possible Predecessors

dev_open_windowdev_open_windowDevOpenWindowdev_open_windowDevOpenWindowDevOpenWindow

Possible Successors

dev_displaydev_displayDevDisplaydev_displayDevDisplayDevDisplay

Alternatives

dev_set_colordev_set_colorDevSetColordev_set_colorDevSetColorDevSetColor

See also

dev_set_drawdev_set_drawDevSetDrawdev_set_drawDevSetDrawDevSetDraw, dev_set_line_widthdev_set_line_widthDevSetLineWidthdev_set_line_widthDevSetLineWidthDevSetLineWidth, set_coloredset_coloredSetColoredset_coloredSetColoredSetColored

Module

Foundation


ClassesClassesClassesClasses | | | | Operators