create_drawing_object_textT_create_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectText (Operator)

Name

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

Signature

create_drawing_object_text( : : Row, Column, String : DrawID)

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

void CreateDrawingObjectText(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)

static void HOperatorSet.CreateDrawingObjectText(HTuple row, HTuple column, HTuple stringVal, out HTuple drawID)

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

Description

create_drawing_object_textcreate_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextCreateDrawingObjectText creates a text object which can be moved interactively across a HALCON window. The coordinates RowRowRowRowrow and ColumnColumnColumnColumncolumn define the position of the text.

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 text object must be attached to an existing window. See attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindow 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_paramsset_drawing_object_paramsSetDrawingObjectParamsSetDrawingObjectParamsSetDrawingObjectParams. Once attached, the text can be moved by the user through interaction with the window.

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

RowRowRowRowrow (input_control)  point.y HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinate of the text position.

Default value: 12

ColumnColumnColumnColumncolumn (input_control)  point.x HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinate of the text position.

Default value: 12

StringStringStringStringstringVal (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Character string to be displayed.

Default value: 'Text' "Text" "Text" "Text" "Text"

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_textcreate_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextCreateDrawingObjectText returns the value 2 (H_MSG_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, set_drawing_object_paramsset_drawing_object_paramsSetDrawingObjectParamsSetDrawingObjectParamsSetDrawingObjectParams

Alternatives

write_stringwrite_stringWriteStringWriteStringWriteString

See also

write_stringwrite_stringWriteStringWriteStringWriteString, attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindow

Module

Foundation