create_drawing_object_ellipseT_create_drawing_object_ellipseCreateDrawingObjectEllipseCreateDrawingObjectEllipsecreate_drawing_object_ellipse创建绘图对象椭圆(算子)

名称

create_drawing_object_ellipseT_create_drawing_object_ellipseCreateDrawingObjectEllipseCreateDrawingObjectEllipsecreate_drawing_object_ellipse — 创建一个可以交互式修改的椭圆。

签名

create_drawing_object_ellipse( : : Row, Column, Phi, Radius1, Radius2 : DrawID)

Herror T_create_drawing_object_ellipse(const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, Htuple* DrawID)

void CreateDrawingObjectEllipse(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, HTuple* DrawID)

void HDrawingObject::CreateDrawingObjectEllipse(double Row, double Column, double Phi, double Radius1, double Radius2)

static void HOperatorSet.CreateDrawingObjectEllipse(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, out HTuple drawID)

void HDrawingObject.CreateDrawingObjectEllipse(double row, double column, double phi, double radius1, double radius2)

def create_drawing_object_ellipse(row: float, column: float, phi: float, radius_1: float, radius_2: float) -> HHandle

描述

create_drawing_object_ellipsecreate_drawing_object_ellipseCreateDrawingObjectEllipseCreateDrawingObjectEllipseCreateDrawingObjectEllipsecreate_drawing_object_ellipse 创建一个椭圆,用户可在 HALCON 窗口中对其进行交互式修改。该椭圆由中心点的坐标 RowRowRowRowrowrowColumnColumnColumnColumncolumncolumn,两半轴长度 Radius1Radius1Radius1Radius1radius1radius_1Radius2Radius2Radius2Radius2radius2radius_2 以及方向角 PhiPhiPhiPhiphiphi 定义。

可通过 get_drawing_object_paramsget_drawing_object_paramsGetDrawingObjectParamsGetDrawingObjectParamsGetDrawingObjectParamsget_drawing_object_params 查询参数,并使用 get_drawing_object_iconicget_drawing_object_iconicGetDrawingObjectIconicGetDrawingObjectIconicGetDrawingObjectIconicget_drawing_object_iconic 获取对应的 HALCON 对象。

除上述参数外,每个绘图对象还包含若干决定其在 HALCON 窗口中外观的参数。具体参数数量及含义详见 set_drawing_object_paramsset_drawing_object_paramsSetDrawingObjectParamsSetDrawingObjectParamsSetDrawingObjectParamsset_drawing_object_params 说明。

为启用绘图对象的交互式修改功能,该对象必须附加到现有窗口。有关详细信息,请参阅 attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindowattach_drawing_object_to_window。椭圆对象附加后,用户可通过窗口交互进行编辑。支持三种变换操作:调整大小、位移和旋转。点击顶点控制柄附近区域可调整椭圆尺寸。拖动第一半轴顶点可修改椭圆方向(即旋转角度)。拖动中心点可在 HALCON 窗口内移动椭圆。

draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse 算子不同,此交互过程不会阻塞调用线程。

执行信息

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

参数

RowRowRowRowrowrow (输入控制)  ellipse.center.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

中心列索引。

默认值: 200

ColumnColumnColumnColumncolumncolumn (输入控制)  ellipse.center.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

中心列索引。

默认值: 200

PhiPhiPhiPhiphiphi (输入控制)  ellipse.angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

第一半轴的方向(单位:弧度)。

默认值: 0

Radius1Radius1Radius1Radius1radius1radius_1 (输入控制)  ellipse.radius1 HTuplefloatHTupleHtuple (real) (double) (double) (double)

第一半轴。

默认值: 100

Radius2Radius2Radius2Radius2radius2radius_2 (输入控制)  ellipse.radius2 HTuplefloatHTupleHtuple (real) (double) (double) (double)

第二半轴。

默认值: 60

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

绘图对象的句柄。

结果

如果参数值正确,算子 create_drawing_object_ellipsecreate_drawing_object_ellipseCreateDrawingObjectEllipseCreateDrawingObjectEllipseCreateDrawingObjectEllipsecreate_drawing_object_ellipse 返回值 2 (H_MSG_TRUE)。否则将抛出异常。

可能的前趋

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

可能的后继

disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region, set_coloredset_coloredSetColoredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, set_drawset_drawSetDrawSetDrawSetDrawset_draw, set_insertset_insertSetInsertSetInsertSetInsertset_insert, attach_drawing_object_to_windowattach_drawing_object_to_windowAttachDrawingObjectToWindowAttachDrawingObjectToWindowAttachDrawingObjectToWindowattach_drawing_object_to_window

替代

draw_ellipse_moddraw_ellipse_modDrawEllipseModDrawEllipseModDrawEllipseModdraw_ellipse_mod, draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region

另见

gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse, draw_circledraw_circleDrawCircleDrawCircleDrawCircledraw_circle, draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2draw_rectangle2, set_insertset_insertSetInsertSetInsertSetInsertset_insert

模块

基础