create_drawing_object_xldT_create_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldcreate_drawing_object_xld (算子)

名称

create_drawing_object_xldT_create_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldcreate_drawing_object_xld — 创建一个可以交互式修改的扩展线描述轮廓。

签名

create_drawing_object_xld( : : Row, Column : DrawID)

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

void CreateDrawingObjectXld(const HTuple& Row, const HTuple& Column, HTuple* DrawID)

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

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

void HDrawingObject.CreateDrawingObjectXld(HTuple row, HTuple column)

def create_drawing_object_xld(row: Sequence[Union[float, int]], column: Sequence[Union[float, int]]) -> HHandle

描述

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

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 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_xldset_drawing_object_xldSetDrawingObjectXldSetDrawingObjectXldSetDrawingObjectXldset_drawing_object_xld

In contrast to the operator draw_xlddraw_xldDrawXldDrawXldDrawXlddraw_xld, this interaction does not block the calling thread.

执行信息

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

参数

RowRowRowRowrowrow (输入控制)  coordinates.y-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Row coordinates of the polygon.

默认值: [100,200,200,100]

建议值: 0, 10, 20, 50, 100, 200, 500

ColumnColumnColumnColumncolumncolumn (输入控制)  coordinates.x-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Column coordinates of the polygon.

默认值: [100,100,200,200]

建议值: 0, 10, 20, 50, 100, 200, 500

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

绘图对象的句柄。

结果

如果参数值正确,算子 create_drawing_object_xldcreate_drawing_object_xldCreateDrawingObjectXldCreateDrawingObjectXldCreateDrawingObjectXldcreate_drawing_object_xld 返回值 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, set_drawing_object_xldset_drawing_object_xldSetDrawingObjectXldSetDrawingObjectXldSetDrawingObjectXldset_drawing_object_xld

替代

draw_xlddraw_xldDrawXldDrawXldDrawXlddraw_xld, draw_xld_moddraw_xld_modDrawXldModDrawXldModDrawXldModdraw_xld_mod, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region

另见

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_linecreate_drawing_object_lineCreateDrawingObjectLineCreateDrawingObjectLineCreateDrawingObjectLinecreate_drawing_object_line, create_drawing_object_circlecreate_drawing_object_circleCreateDrawingObjectCircleCreateDrawingObjectCircleCreateDrawingObjectCirclecreate_drawing_object_circle

模块

基础