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

Name

dev_set_partdev_set_partDevSetPartDevSetPartdev_set_part — Modify the displayed image part.

Signature

dev_set_part( : : Row1, Column1, Row2, Column2 : )

Herror dev_set_part(const Hlong Row1, const Hlong Column1, const Hlong Row2, const Hlong Column2)

Herror T_dev_set_part(const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2)

void DevSetPart(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2)

static void HWindow::DevSetPart(Hlong Row1, Hlong Column1, Hlong Row2, Hlong Column2)

static void HOperatorSet.DevSetPart(HTuple row1, HTuple column1, HTuple row2, HTuple column2)

static void HWindow.DevSetPart(int row1, int column1, int row2, int column2)

def dev_set_part(row_1: int, column_1: int, row_2: int, column_2: int) -> None

Description

dev_set_partdev_set_partDevSetPartDevSetPartDevSetPartdev_set_part is used to set the part of the image that is displayed in the graphics window. The parameters Row1Row1Row1Row1row1row_1 and Column1Column1Column1Column1column1column_1 specify the upper left corner, Row2Row2Row2Row2row2row_2 and Column2Column2Column2Column2column2column_2 the lower right corner of the image part to display.

For more information see the description of the operator set_partset_partSetPartSetPartSetPartset_part. In addition, if Row1Row1Row1Row1row1row_1 is larger than Row2Row2Row2Row2row2row_2 or Column1Column1Column1Column1column1column_1 larger than Column2Column2Column2Column2column2column_2, the zooming in the particular dimension will be reset to show the complete height and/or width of the image. Please note that this is not possible with the operator set_partset_partSetPartSetPartSetPartset_part outside HDevelop.

In addition, note that the part is automatically reset, if a new program is loaded, a program reset is performed, or a new image with a different image size is displayed.

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

Row1Row1Row1Row1row1row_1 (input_control)  rectangle.origin.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row of the upper left corner of the chosen image part.

Default: 0

Column1Column1Column1Column1column1column_1 (input_control)  rectangle.origin.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column of the upper left corner of the chosen image part.

Default: 0

Row2Row2Row2Row2row2row_2 (input_control)  rectangle.corner.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row of the lower right corner of the chosen image part.

Default: 128

Column2Column2Column2Column2column2column_2 (input_control)  rectangle.corner.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column of the lower right corner of the chosen image part.

Default: 128

Example (HDevelop)

read_image (Image, 'fabrik')
for i := 1 to 240 by 10
  dev_set_part (i, i, 511-i, 511-i)
  dev_display (Image)
endfor
dev_set_part (1, 1, -1, -1)
dev_display (Image)

Result

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

Possible Successors

dev_displaydev_displayDevDisplayDevDisplayDevDisplaydev_display

See also

set_partset_partSetPartSetPartSetPartset_part

Module

Foundation