Skip to content

create_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLinecreate_drawing_object_lineT_create_drawing_object_line🔗

Short description🔗

create_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLinecreate_drawing_object_lineT_create_drawing_object_line — Create a line which can be modified interactively.

Signature🔗

create_drawing_object_line( line.begin.y Row1, line.begin.x Column1, line.end.y Row2, line.end.x Column2, out drawing_object DrawID )void CreateDrawingObjectLine( const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* DrawID )static void HOperatorSet.CreateDrawingObjectLine( HTuple row1, HTuple column1, HTuple row2, HTuple column2, out HTuple drawID )def create_drawing_object_line( row_1: float, column_1: float, row_2: float, column_2: float ) -> HHandle

Herror T_create_drawing_object_line( 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 )

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

Description🔗

create_drawing_object_lineCreateDrawingObjectLine 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, Row1row1row_1 and Column1column1column_1, and the second line point, Row2row2row_2 and Column2column2column_2.

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

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_paramsSetDrawingObjectParams 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_windowAttachDrawingObjectToWindow 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_lineDrawLine, this interaction does not block the calling thread.

Execution information🔗

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🔗

Row1row1row_1 (input_control) line.begin.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

Row coordinate of the first line point.

Default: 100100

Column1column1column_1 (input_control) line.begin.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

Column coordinate of the first line point.

Default: 100100

Row2row2row_2 (input_control) line.end.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

Row coordinate of the second line point.

Default: 200200

Column2column2column_2 (input_control) line.end.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

Column coordinate of the second line point.

Default: 200200

DrawIDdrawIDdraw_id (output_control) drawing_object → (handle)HTuple (HHandle)HDrawingObject, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the drawing object.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

open_windowOpenWindow

Possible successors

attach_drawing_object_to_windowAttachDrawingObjectToWindow, get_drawing_object_paramsGetDrawingObjectParams, get_drawing_object_iconicGetDrawingObjectIconic

Alternatives

draw_lineDrawLine, draw_line_modDrawLineMod, create_drawing_object_xldCreateDrawingObjectXld

See also

create_drawing_object_rectangle1CreateDrawingObjectRectangle1, create_drawing_object_rectangle2CreateDrawingObjectRectangle2, create_drawing_object_ellipseCreateDrawingObjectEllipse, create_drawing_object_circle_sectorCreateDrawingObjectCircleSector, create_drawing_object_ellipse_sectorCreateDrawingObjectEllipseSector, create_drawing_object_xldCreateDrawingObjectXld

Module🔗

Foundation