Skip to content

create_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextcreate_drawing_object_textT_create_drawing_object_text🔗

Short description🔗

create_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextcreate_drawing_object_textT_create_drawing_object_text — Create a text object which can be moved interactively.

Signature🔗

create_drawing_object_text( point.y Row, point.x Column, string String, out drawing_object DrawID )void CreateDrawingObjectText( const HTuple& Row, const HTuple& Column, const HTuple& String, HTuple* DrawID )static void HOperatorSet.CreateDrawingObjectText( HTuple row, HTuple column, HTuple stringVal, out HTuple drawID )def create_drawing_object_text( row: int, column: int, string: str ) -> HHandle

Herror T_create_drawing_object_text( const Htuple Row, const Htuple Column, const Htuple String, Htuple* DrawID )

void HDrawingObject::CreateDrawingObjectText( Hlong Row, Hlong Column, const HString& String )

void HDrawingObject::CreateDrawingObjectText( Hlong Row, Hlong Column, const char* String )

void HDrawingObject::CreateDrawingObjectText( Hlong Row, Hlong Column, const wchar_t* String ) (Windows only)

void HDrawingObject.CreateDrawingObjectText( int row, int column, string stringVal )

Description🔗

create_drawing_object_textCreateDrawingObjectText creates a text object which can be moved interactively across a HALCON window. The coordinates Rowrowrow and Columncolumncolumn define the position of the text.

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 text object must be attached to an existing window. See attach_drawing_object_to_windowAttachDrawingObjectToWindow for further details. The text will be displayed with the current font settings of the HALCON window by default. However, the font setting can be adjusted with set_drawing_object_paramsSetDrawingObjectParams. Once attached, the text can be moved by the user through interaction with the window.

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) point.y → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Row coordinate of the text position.

Default: 1212

Columncolumncolumn (input_control) point.x → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Column coordinate of the text position.

Default: 1212

StringstringValstring (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Character string to be displayed.

Default: 'Text'"Text"

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_textCreateDrawingObjectText 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, set_drawing_object_paramsSetDrawingObjectParams

Alternatives

write_stringWriteString

See also

write_stringWriteString, attach_drawing_object_to_windowAttachDrawingObjectToWindow

Module🔗

Foundation