create_drawing_object_rectangle1T_create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1 (Operator)

Name

create_drawing_object_rectangle1T_create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1 — 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)

Description

create_drawing_object_rectangle1create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1 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 Row1Row1Row1Row1row1, Column1Column1Column1Column1column1, Row2Row2Row2Row2row2, and Column2Column2Column2Column2column2 of its upper left and lower right corner. The created rectangle is returned in the handle DrawIDDrawIDDrawIDDrawIDdrawID.

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

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_paramsSetDrawingObjectParamsSetDrawingObjectParamsSetDrawingObjectParams 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_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindow 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_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1, this interaction does not block the calling thread.

Execution Information

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

Row1Row1Row1Row1row1 (input_control)  rectangle.origin.y HTupleHTupleHtuple (real) (double) (double) (double)

Row coordinate of the upper left corner.

Default value: 100

Column1Column1Column1Column1column1 (input_control)  rectangle.origin.x HTupleHTupleHtuple (real) (double) (double) (double)

Column coordinate of the upper left corner.

Default value: 100

Row2Row2Row2Row2row2 (input_control)  rectangle.corner.y HTupleHTupleHtuple (real) (double) (double) (double)

Row coordinate of the lower right corner.

Default value: 200

Column2Column2Column2Column2column2 (input_control)  rectangle.corner.x HTupleHTupleHtuple (real) (double) (double) (double)

Column coordinate of the lower right corner.

Default value: 200

DrawIDDrawIDDrawIDDrawIDdrawID (output_control)  drawing_object HDrawingObject, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the drawing object.

Result

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

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindow

Possible Successors

disp_regiondisp_regionDispRegionDispRegionDispRegion, set_coloredset_coloredSetColoredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidth, set_drawset_drawSetDrawSetDrawSetDraw, set_insertset_insertSetInsertSetInsertSetInsert, attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindow

Alternatives

draw_rectangle1_moddraw_rectangle1_modDrawRectangle1ModDrawRectangle1ModDrawRectangle1Mod, draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2, draw_regiondraw_regionDrawRegionDrawRegionDrawRegion

See also

gen_rectangle1gen_rectangle1GenRectangle1GenRectangle1GenRectangle1, draw_circledraw_circleDrawCircleDrawCircleDrawCircle, draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipse, set_insertset_insertSetInsertSetInsertSetInsert

Module

Foundation