create_drawing_object_lineT_create_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLine (Operator)

Name

create_drawing_object_lineT_create_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLine — Create a line which can be modified interactively.

Signature

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

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

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

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

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

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

Description

create_drawing_object_linecreate_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLineCreateDrawingObjectLine creates a line which can be modified interactively in a HALCON window by the user. The line is defined by the coordinates of the first line point, Row1Row1Row1Row1row1 and Column1Column1Column1Column1column1, and the second line point, Row2Row2Row2Row2row2 and Column2Column2Column2Column2column2.

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 line is editable by the user through interaction with the window. There are two possible transformations for a line object: resizing and displacement. A line point can be moved by dragging on the point handle. The whole line can be moved by dragging the center of the line.

In contrast to the operator draw_linedraw_lineDrawLineDrawLineDrawLine, 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)  line.begin.y HTupleHTupleHtuple (real) (double) (double) (double)

Row index of the first line point.

Default value: 100

Column1Column1Column1Column1column1 (input_control)  line.begin.x HTupleHTupleHtuple (real) (double) (double) (double)

Column index of the first line point.

Default value: 100

Row2Row2Row2Row2row2 (input_control)  line.end.y HTupleHTupleHtuple (real) (double) (double) (double)

Row index of the second line point.

Default value: 200

Column2Column2Column2Column2column2 (input_control)  line.end.x HTupleHTupleHtuple (real) (double) (double) (double)

Column index of the second line point.

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_circle_sectorcreate_drawing_object_circle_sectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSector returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowOpenWindow

Possible Successors

attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindow, get_drawing_object_paramsget_drawing_object_paramsGetDrawingObjectParamsGetDrawingObjectParamsGetDrawingObjectParams, get_drawing_object_iconicget_drawing_object_iconicGetDrawingObjectIconicGetDrawingObjectIconicGetDrawingObjectIconic

Alternatives

draw_linedraw_lineDrawLineDrawLineDrawLine, draw_line_moddraw_line_modDrawLineModDrawLineModDrawLineMod, create_drawing_object_xldcreate_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldCreateDrawingObjectXld

See also

create_drawing_object_rectangle1create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1, create_drawing_object_rectangle2create_drawing_object_rectangle2CreateDrawingObjectRectangle2CreateDrawingObjectRectangle2CreateDrawingObjectRectangle2, create_drawing_object_ellipsecreate_drawing_object_ellipseCreateDrawingObjectEllipseCreateDrawingObjectEllipseCreateDrawingObjectEllipse, create_drawing_object_circle_sectorcreate_drawing_object_circle_sectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSector, create_drawing_object_ellipse_sectorcreate_drawing_object_ellipse_sectorCreateDrawingObjectEllipseSectorCreateDrawingObjectEllipseSectorCreateDrawingObjectEllipseSector, create_drawing_object_xldcreate_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldCreateDrawingObjectXld

Module

Foundation