使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

使用右上角的选项卡切换到不同的编程语言。

dev_set_paintT_dev_set_paintDevSetPaintDevSetPaintdev_set_paint (算子)

名称

dev_set_paintT_dev_set_paintDevSetPaintDevSetPaintdev_set_paint — Define the gray value output mode.

签名

dev_set_paint( : : Mode : )

Herror T_dev_set_paint(const Htuple Mode)

void DevSetPaint(const HTuple& Mode)

static void HWindow::DevSetPaint(const HTuple& Mode)

static void HOperatorSet.DevSetPaint(HTuple mode)

static void HWindow.DevSetPaint(HTuple mode)

def dev_set_paint(mode: Sequence[Union[int, str]]) -> None

描述

dev_set_paintdev_set_paintDevSetPaintDevSetPaintDevSetPaintdev_set_paint defines the output mode that is used for displaying image objects in the graphics window.

For a detailed description of all possible options see set_paintset_paintSetPaintSetPaintSetPaintset_paint。However, in contrast to that operator the display mode is also used for all new graphics windows that are opened afterwards.

注意

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.

参数

ModeModeModeModemodemode (输入控制)  string-array HTupleSequence[Union[int, str]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Grayvalue output name. Additional parameters possible.

默认值: 'default' "default" "default" "default" "default" "default"

建议值: 'default'"default""default""default""default""default", '3d_plot'"3d_plot""3d_plot""3d_plot""3d_plot""3d_plot"

示例(HDevelop)

read_image(Image,'fabrik')
dev_set_paint('3d_plot')
dev_display(Image)

结果

If the values of the specified parameters are correct, dev_set_paintdev_set_paintDevSetPaintDevSetPaintDevSetPaintdev_set_paint 返回 2 ( H_MSG_TRUE )。否则,将抛出一个异常并返回错误代码。

可能的前趋

dev_open_windowdev_open_windowDevOpenWindowDevOpenWindowDevOpenWindowdev_open_window

可能的后继

dev_set_colordev_set_colorDevSetColorDevSetColorDevSetColordev_set_color, dev_displaydev_displayDevDisplayDevDisplayDevDisplaydev_display

另见

set_paintset_paintSetPaintSetPaintSetPaintset_paint

模块

基础