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_drawdev_set_drawDevSetDrawdev_set_drawDevSetDrawDevSetDraw (Operator)

Name

dev_set_drawdev_set_drawDevSetDrawdev_set_drawDevSetDrawDevSetDraw — Define the region fill mode.

Signature

dev_set_draw( : : DrawMode : )

Herror dev_set_draw(const char* DrawMode)

Herror T_dev_set_draw(const Htuple DrawMode)

Herror dev_set_draw(const HTuple& DrawMode)

void HWindow::DevSetDraw(const HTuple& DrawMode) const

void DevSetDraw(const HTuple& DrawMode)

static void HWindow::DevSetDraw(const HString& DrawMode)

static void HWindow::DevSetDraw(const char* DrawMode)

void HOperatorSetX.DevSetDraw([in] VARIANT DrawMode)

void HWindowX.DevSetDraw([in] BSTR DrawMode)

static void HOperatorSet.DevSetDraw(HTuple drawMode)

static void HWindow.DevSetDraw(string drawMode)

Description

dev_set_drawdev_set_drawDevSetDrawdev_set_drawDevSetDrawDevSetDraw defines the fill mode for regions. If DrawModeDrawModeDrawModeDrawModeDrawModedrawMode is set to 'fill'"fill""fill""fill""fill""fill", regions are displayed filled, if set to 'margin'"margin""margin""margin""margin""margin", only contours are displayed. In the 'margin'"margin""margin""margin""margin""margin" mode, the appearance of the contours can be affected by dev_set_line_widthdev_set_line_widthDevSetLineWidthdev_set_line_widthDevSetLineWidthDevSetLineWidth and set_line_styleset_line_styleSetLineStyleset_line_styleSetLineStyleSetLineStyle.

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

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

DrawModeDrawModeDrawModeDrawModeDrawModedrawMode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Fill mode for region output.

Default value: 'fill' "fill" "fill" "fill" "fill" "fill"

List of values: 'fill'"fill""fill""fill""fill""fill", 'margin'"margin""margin""margin""margin""margin"

Example (HDevelop)

read_image(Image,'monkey')
threshold(Image,Region,128,255)
dev_clear_window ()
dev_set_color('red')
dev_set_draw('fill')
dev_display(Region)
dev_set_color('white')
dev_set_draw('margin')
dev_display(Region)

Result

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

Possible Successors

dev_set_line_widthdev_set_line_widthDevSetLineWidthdev_set_line_widthDevSetLineWidthDevSetLineWidth, dev_displaydev_displayDevDisplaydev_displayDevDisplayDevDisplay

See also

set_drawset_drawSetDrawset_drawSetDrawSetDraw

Module

Foundation


ClassesClassesClassesClasses | | | | Operators