Skip to content

create_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldcreate_drawing_object_xldT_create_drawing_object_xld🔗

Short description🔗

create_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldcreate_drawing_object_xldT_create_drawing_object_xld — Create a XLD contour which can be modified interactively.

Signature🔗

create_drawing_object_xld( coordinates.y Row, coordinates.x Column, out drawing_object DrawID )void CreateDrawingObjectXld( const HTuple& Row, const HTuple& Column, HTuple* DrawID )static void HOperatorSet.CreateDrawingObjectXld( HTuple row, HTuple column, out HTuple drawID )def create_drawing_object_xld( row: Sequence[Union[float, int]], column: Sequence[Union[float, int]] ) -> HHandle

Herror T_create_drawing_object_xld( const Htuple Row, const Htuple Column, Htuple* DrawID )

void HDrawingObject::CreateDrawingObjectXld( const HTuple& Row, const HTuple& Column )

void HDrawingObject.CreateDrawingObjectXld( HTuple row, HTuple column )

Description🔗

create_drawing_object_xldCreateDrawingObjectXld creates an XLD contour which can be modified interactively in a HALCON window by the user. The contour is defined by the coordinates Rowrowrow and Columncolumncolumn of its points.

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 contour is editable by the user through interaction with the window. Further points can be added by left clicking on the window. When clicking the contour segment between two consecutive points, a new point is added between those points. Each contour point can be moved by dragging its point handle. A single contour point can be deleted by dragging it over one of the neighboring contour points directly connected to it. The contour can be closed by moving the last point onto the first contour point. The contour can be moved as a whole by dragging it by the handle in the center. In addition, it is possible to assign a new contour to a drawing object with set_drawing_object_xldSetDrawingObjectXld.

In contrast to the operator draw_xldDrawXld, 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🔗

Rowrowrow (input_control) coordinates.y-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Row coordinates of the polygon.

Default: [100, 200, 200, 100][100, 200, 200, 100]
Suggested values: 0, 10, 20, 50, 100, 200, 5000, 10, 20, 50, 100, 200, 500

Columncolumncolumn (input_control) coordinates.x-array → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Column coordinates of the polygon.

Default: [100, 100, 200, 200][100, 100, 200, 200]
Suggested values: 0, 10, 20, 50, 100, 200, 5000, 10, 20, 50, 100, 200, 500

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_xldCreateDrawingObjectXld 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, set_drawing_object_xldSetDrawingObjectXld

Alternatives

draw_xldDrawXld, draw_xld_modDrawXldMod, draw_regionDrawRegion

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_lineCreateDrawingObjectLine, create_drawing_object_circleCreateDrawingObjectCircle

Module🔗

Foundation