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

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

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

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

dev_set_line_widthdev_set_line_widthDevSetLineWidthDevSetLineWidthdev_set_line_width (算子)

名称

dev_set_line_widthdev_set_line_widthDevSetLineWidthDevSetLineWidthdev_set_line_width — Define the line width for region contour output.

签名

dev_set_line_width( : : LineWidth : )

Herror dev_set_line_width(const Hlong LineWidth)

Herror T_dev_set_line_width(const Htuple LineWidth)

void DevSetLineWidth(const HTuple& LineWidth)

static void HWindow::DevSetLineWidth(Hlong LineWidth)

static void HOperatorSet.DevSetLineWidth(HTuple lineWidth)

static void HWindow.DevSetLineWidth(int lineWidth)

def dev_set_line_width(line_width: int) -> None

描述

dev_set_line_widthdev_set_line_widthDevSetLineWidthDevSetLineWidthDevSetLineWidthdev_set_line_width defines the line width (in pixel) that is used to display region contours (in 'margin'"margin""margin""margin""margin""margin" mode), XLDs, and other geometric output (e.g., disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region, disp_linedisp_lineDispLineDispLineDispLinedisp_line, etc.).

For more information see the description of the operator set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width。However, in contrast to that operator the new line width 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.

参数

LineWidthLineWidthLineWidthLineWidthlineWidthline_width (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Line width for region output in contour mode.

默认值: 1

限制: LineWidth >= 1

示例(HDevelop)

read_image(Image,'monkey')
threshold(Image,Region,128,255)
dev_set_draw('margin')
dev_set_line_width(5)
dev_clear_window ()
dev_display(Region)

结果

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

可能的后继

dev_displaydev_displayDevDisplayDevDisplayDevDisplaydev_display

另见

set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, query_line_widthquery_line_widthQueryLineWidthQueryLineWidthQueryLineWidthquery_line_width

模块

基础