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_ellipsecreate_drawing_object_ellipseCreateDrawingObjectEllipseCreateDrawingObjectEllipseCreateDrawingObjectEllipsecreate_drawing_object_ellipse creates an ellipse which can be
modified interactively in a HALCON window by the user. The ellipse is defined
by the coordinates of its center point, RowRowRowRowrowrow and ColumnColumnColumnColumncolumncolumn,
the lengths of its respective half axis, Radius1Radius1Radius1Radius1radius1radius_1 and
Radius2Radius2Radius2Radius2radius2radius_2, and its orientation PhiPhiPhiPhiphiphi。
The parameters can be queried 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 ellipse is editable by the user through interaction
with the window.
There are three possible transformations for an ellipse object:
resizing, displacement and rotation.
The ellipse can be resized by clicking close to the vertex handles.
The orientation and thus the rotation of the ellipse can be modified by
dragging on a vertex of the first half axis. The ellipse can be moved in
the HALCON window by dragging the center.
In contrast to the operator draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse, this interaction does not
block the calling thread.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
参数
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)
Orientation of the first half axis in radians.
默认值:
0
Radius1Radius1Radius1Radius1radius1radius_1 (输入控制) ellipse.radius1 → HTuplefloatHTupleHtuple (real) (double) (double) (double)
First half axis.
默认值:
100
Radius2Radius2Radius2Radius2radius2radius_2 (输入控制) ellipse.radius2 → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Second half axis.
默认值:
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
模块
基础