create_drawing_object_lineT_create_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLinecreate_drawing_object_line (算子)

名称

create_drawing_object_lineT_create_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLinecreate_drawing_object_line — 创建一条可以交互式修改的线。

签名

create_drawing_object_line( : : Row1, Column1, Row2, Column2 : DrawID)

Herror T_create_drawing_object_line(const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2, Htuple* DrawID)

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

static void HOperatorSet.CreateDrawingObjectLine(HTuple row1, HTuple column1, HTuple row2, HTuple column2, out HTuple drawID)

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

def create_drawing_object_line(row_1: float, column_1: float, row_2: float, column_2: float) -> HHandle

描述

create_drawing_object_linecreate_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLineCreateDrawingObjectLinecreate_drawing_object_line 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, Row1Row1Row1Row1row1row_1 and Column1Column1Column1Column1column1column_1, and the second line point, Row2Row2Row2Row2row2row_2 and Column2Column2Column2Column2column2column_2

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

执行信息

此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。

参数

Row1Row1Row1Row1row1row_1 (输入控制)  line.begin.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Row coordinate of the first line point.

默认值: 100

Column1Column1Column1Column1column1column_1 (输入控制)  line.begin.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Column coordinate of the first line point.

默认值: 100

Row2Row2Row2Row2row2row_2 (输入控制)  line.end.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Row coordinate of the second line point.

默认值: 200

Column2Column2Column2Column2column2column_2 (输入控制)  line.end.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Column coordinate of the second line point.

默认值: 200

DrawIDDrawIDDrawIDDrawIDdrawIDdraw_id (输出控制)  drawing_object HDrawingObject, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

绘图对象的句柄。

结果

If the parameter values are correct the operator create_drawing_object_circle_sectorcreate_drawing_object_circle_sectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSectorcreate_drawing_object_circle_sector 返回值 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, get_drawing_object_iconicget_drawing_object_iconicGetDrawingObjectIconicGetDrawingObjectIconicGetDrawingObjectIconicget_drawing_object_iconic

替代

draw_linedraw_lineDrawLineDrawLineDrawLinedraw_line, draw_line_moddraw_line_modDrawLineModDrawLineModDrawLineModdraw_line_mod, create_drawing_object_xldcreate_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldCreateDrawingObjectXldcreate_drawing_object_xld

另见

create_drawing_object_rectangle1create_drawing_object_rectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1CreateDrawingObjectRectangle1create_drawing_object_rectangle1, create_drawing_object_rectangle2create_drawing_object_rectangle2CreateDrawingObjectRectangle2CreateDrawingObjectRectangle2CreateDrawingObjectRectangle2create_drawing_object_rectangle2, create_drawing_object_ellipsecreate_drawing_object_ellipseCreateDrawingObjectEllipseCreateDrawingObjectEllipseCreateDrawingObjectEllipsecreate_drawing_object_ellipse, create_drawing_object_circle_sectorcreate_drawing_object_circle_sectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSectorCreateDrawingObjectCircleSectorcreate_drawing_object_circle_sector, create_drawing_object_ellipse_sectorcreate_drawing_object_ellipse_sectorCreateDrawingObjectEllipseSectorCreateDrawingObjectEllipseSectorCreateDrawingObjectEllipseSectorcreate_drawing_object_ellipse_sector, create_drawing_object_xldcreate_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldCreateDrawingObjectXldcreate_drawing_object_xld

模块

基础