ClassesClasses | | 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.

dev_set_coloreddev_set_coloredDevSetColoredDevSetColored (Operator)

Name

dev_set_coloreddev_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)

void DevSetColored(const HTuple& NumColors)

static void HWindow::DevSetColored(Hlong NumColors)

static void HOperatorSet.DevSetColored(HTuple numColors)

static void HWindow.DevSetColored(int numColors)

Description

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

For more information see the description of the operator set_coloredset_coloredSetColoredSetColoredSetColored. 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_colorDevSetColorDevSetColorDevSetColor or dev_set_coloreddev_set_coloredDevSetColoredDevSetColoredDevSetColored 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

NumColorsNumColorsNumColorsNumColorsnumColors (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (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_coloredDevSetColoredDevSetColoredDevSetColored returns 2 (H_MSG_TRUE). Otherwise an exception is raised and an error code returned.

Possible Predecessors

dev_open_windowdev_open_windowDevOpenWindowDevOpenWindowDevOpenWindow

Possible Successors

dev_displaydev_displayDevDisplayDevDisplayDevDisplay

Alternatives

dev_set_colordev_set_colorDevSetColorDevSetColorDevSetColor

See also

dev_set_drawdev_set_drawDevSetDrawDevSetDrawDevSetDraw, dev_set_line_widthdev_set_line_widthDevSetLineWidthDevSetLineWidthDevSetLineWidth, set_coloredset_coloredSetColoredSetColoredSetColored

Module

Foundation


ClassesClasses | | Operators