Operator Reference

create_drawing_object_rectangle1T_create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1create_drawing_object_rectangle1 (Operator)

create_drawing_object_rectangle1T_create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1create_drawing_object_rectangle1 — Create a rectangle parallel to the coordinate axis which can be modified interactively.

Signature

create_drawing_object_rectangle1( : : Row1, Column1, Row2, Column2 : DrawID)

Herror T_create_drawing_object_rectangle1(const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2, Htuple* DrawID)

void CreateDrawingObjectRectangle1(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* DrawID)

void HDrawingObject::HDrawingObject(double Row1, double Column1, double Row2, double Column2)

void HDrawingObject::CreateDrawingObjectRectangle1(double Row1, double Column1, double Row2, double Column2)

static void HOperatorSet.CreateDrawingObjectRectangle1(HTuple row1, HTuple column1, HTuple row2, HTuple column2, out HTuple drawID)

public HDrawingObject(double row1, double column1, double row2, double column2)

void HDrawingObject.CreateDrawingObjectRectangle1(double row1, double column1, double row2, double column2)

def create_drawing_object_rectangle1(row_1: float, column_1: float, row_2: float, column_2: float) -> HHandle

Description

create_drawing_object_rectangle1create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1create_drawing_object_rectangle1 creates a rectangle aligned along the coordinate axis which can be modified interactively in a HALCON window by the user. The rectangle is defined by the coordinates Row1Row1Row1row1row_1, Column1Column1Column1column1column_1, Row2Row2Row2row2row_2, and Column2Column2Column2column2column_2 of its upper left and lower right corner. The created rectangle is returned in the handle DrawIDDrawIDDrawIDdrawIDdraw_id.

These parameters can be queried any time with get_drawing_object_paramsget_drawing_object_paramsGetDrawingObjectParamsGetDrawingObjectParamsget_drawing_object_params, as well as its corresponding HALCON object with get_drawing_object_iconicget_drawing_object_iconicGetDrawingObjectIconicGetDrawingObjectIconicget_drawing_object_iconic.

In addition to those parameters, every drawing object has a number of parameters which determine the appearance of the object in the HALCON window. See set_drawing_object_paramsset_drawing_object_paramsSetDrawingObjectParamsSetDrawingObjectParamsset_drawing_object_params for details on the number and meaning of those parameters.

In order to enable the interactive modification with the drawing object, the object must be attached to an existing window. See attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowattach_drawing_object_to_window for further details. Once attached, the rectangle is editable by the user through interaction with the window. There are two possible transformations for a rectangle1 object: resizing and displacement. The rectangle can be moved by dragging in the middle of the rectangle and resized by dragging the handles of the corners.

In contrast to the operator draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1draw_rectangle1, this interaction does not block the calling thread.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

Row1Row1Row1row1row_1 (input_control)  rectangle.origin.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Row coordinate of the upper left corner.

Default: 100

Column1Column1Column1column1column_1 (input_control)  rectangle.origin.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Column coordinate of the upper left corner.

Default: 100

Row2Row2Row2row2row_2 (input_control)  rectangle.corner.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Row coordinate of the lower right corner.

Default: 200

Column2Column2Column2column2column_2 (input_control)  rectangle.corner.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Column coordinate of the lower right corner.

Default: 200

DrawIDDrawIDDrawIDdrawIDdraw_id (output_control)  drawing_object HDrawingObject, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the drawing object.

Result

If the parameter values are correct, the operator create_drawing_object_rectangle1create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1create_drawing_object_rectangle1 returns the value 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowopen_window

Possible Successors

disp_regiondisp_regionDispRegionDispRegiondisp_region, set_coloredset_coloredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthset_line_width, set_drawset_drawSetDrawSetDrawset_draw, set_insertset_insertSetInsertSetInsertset_insert, attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowattach_drawing_object_to_window

Alternatives

draw_rectangle1_moddraw_rectangle1_modDrawRectangle1ModDrawRectangle1Moddraw_rectangle1_mod, draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2draw_rectangle2, draw_regiondraw_regionDrawRegionDrawRegiondraw_region

See also

gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1gen_rectangle1, draw_circledraw_circleDrawCircleDrawCircledraw_circle, draw_ellipsedraw_ellipseDrawEllipseDrawEllipsedraw_ellipse, set_insertset_insertSetInsertSetInsertset_insert

Module

Foundation