create_drawing_object_textT_create_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextcreate_drawing_object_text (算子)
名称
create_drawing_object_textT_create_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextcreate_drawing_object_text — 创建一个可以交互式移动的文本对象。
签名
Herror T_create_drawing_object_text(const Htuple Row, const Htuple Column, const Htuple String, Htuple* DrawID)
def create_drawing_object_text(row: int, column: int, string: str) -> HHandle
描述
create_drawing_object_textcreate_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextCreateDrawingObjectTextcreate_drawing_object_text creates a text object which can be moved
interactively across a HALCON window. The coordinates RowRowRowRowrowrow and
ColumnColumnColumnColumncolumncolumn define the position of the text.
These parameters can be queried any time with get_drawing_object_paramsget_drawing_object_paramsGetDrawingObjectParamsGetDrawingObjectParamsGetDrawingObjectParamsget_drawing_object_params,
as well as its corresponding HALCON object with get_drawing_object_iconicget_drawing_object_iconicGetDrawingObjectIconicGetDrawingObjectIconicGetDrawingObjectIconicget_drawing_object_iconic。
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_paramsSetDrawingObjectParamsSetDrawingObjectParamsSetDrawingObjectParamsset_drawing_object_params 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_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindowattach_drawing_object_to_window 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_paramsSetDrawingObjectParamsSetDrawingObjectParamsSetDrawingObjectParamsset_drawing_object_params。Once attached, the text can be moved by the user through interaction
with the window.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
参数
RowRowRowRowrowrow (输入控制) point.y → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Row coordinate of the text position.
默认值:
12
ColumnColumnColumnColumncolumncolumn (输入控制) point.x → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Column coordinate of the text position.
默认值:
12
StringStringStringStringstringValstring (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Character string to be displayed.
默认值:
'Text'
"Text"
"Text"
"Text"
"Text"
"Text"
DrawIDDrawIDDrawIDDrawIDdrawIDdraw_id (输出控制) drawing_object → HDrawingObject, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
绘图对象的句柄。
结果
如果参数值正确,算子
create_drawing_object_textcreate_drawing_object_textCreateDrawingObjectTextCreateDrawingObjectTextCreateDrawingObjectTextcreate_drawing_object_text 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window
可能的后继
attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindowattach_drawing_object_to_window,
get_drawing_object_paramsget_drawing_object_paramsGetDrawingObjectParamsGetDrawingObjectParamsGetDrawingObjectParamsget_drawing_object_params,
set_drawing_object_paramsset_drawing_object_paramsSetDrawingObjectParamsSetDrawingObjectParamsSetDrawingObjectParamsset_drawing_object_params
替代
write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string
另见
write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string,
attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindowattach_drawing_object_to_window
模块
基础