draw_circleT_draw_circleDrawCircleDrawCircledraw_circle (算子名称)

名称

draw_circleT_draw_circleDrawCircleDrawCircledraw_circle — Interactive drawing of a circle.

参数签名

draw_circle( : : WindowHandle : Row, Column, Radius)

Herror T_draw_circle(const Htuple WindowHandle, Htuple* Row, Htuple* Column, Htuple* Radius)

void DrawCircle(const HTuple& WindowHandle, HTuple* Row, HTuple* Column, HTuple* Radius)

void HWindow::DrawCircle(double* Row, double* Column, double* Radius) const

static void HOperatorSet.DrawCircle(HTuple windowHandle, out HTuple row, out HTuple column, out HTuple radius)

void HWindow.DrawCircle(out double row, out double column, out double radius)

def draw_circle(window_handle: HHandle) -> Tuple[float, float, float]

描述

draw_circledraw_circleDrawCircleDrawCircleDrawCircledraw_circle produces the parameter for a circle created interactive by the user in the window.

To create a circle you have to press the mouse button at the location which is used as the center of that circle. While keeping the mouse button pressed, the RadiusRadiusRadiusRadiusradiusradius's length can be modified through moving the mouse. After another mouse click in the created circle center you can move it. A clicking close to the circular arc you can modify the RadiusRadiusRadiusRadiusradiusradius of the circle. Pressing the right mouse button terminates the procedure. After terminating the procedure the circle is not visible in the window any longer.

注意

If used in a buffer window, mouse events have to be supplied by the application, while the draw operator must be run in another thread.

运行信息

参数表

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

RowRowRowRowrowrow (output_control)  circle.center.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Barycenter's row index.

ColumnColumnColumnColumncolumncolumn (output_control)  circle.center.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Barycenter's column index.

RadiusRadiusRadiusRadiusradiusradius (output_control)  circle.radius HTuplefloatHTupleHtuple (real) (double) (double) (double)

Circle's radius.

例程 (HDevelop)

read_image(Image,'monkey')
draw_circle(WindowHandle,Row,Column,Radius)
gen_circle(Circle,Row,Column,Radius)
reduce_domain(Image,Circle,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)

例程 (C)

read_image(&Image,"monkey");
draw_circle(WindowHandle,&Row,&Column,&Radius);
gen_circle(&Circle,Row,Column,Radius);
reduce_domain(Image,Circle,&GrayCircle);
disp_image(GrayCircle,WindowHandle);

例程 (HDevelop)

read_image(Image,'monkey')
draw_circle(WindowHandle,Row,Column,Radius)
gen_circle(Circle,Row,Column,Radius)
reduce_domain(Image,Circle,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)

例程 (HDevelop)

read_image(Image,'monkey')
draw_circle(WindowHandle,Row,Column,Radius)
gen_circle(Circle,Row,Column,Radius)
reduce_domain(Image,Circle,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)

例程 (HDevelop)

read_image(Image,'monkey')
draw_circle(WindowHandle,Row,Column,Radius)
gen_circle(Circle,Row,Column,Radius)
reduce_domain(Image,Circle,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)

结果

draw_circledraw_circleDrawCircleDrawCircleDrawCircledraw_circle returns 2 ( H_MSG_TRUE) if the window is valid and the needed drawing mode (see set_insertset_insertSetInsertSetInsertSetInsertset_insert) is available. 如有必要,将引发异常。

可能的前置算子

open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window

可能的后置算子

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region, set_coloredset_coloredSetColoredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, set_drawset_drawSetDrawSetDrawSetDrawset_draw, set_insertset_insertSetInsertSetInsertSetInsertset_insert

可替代算子

draw_circle_moddraw_circle_modDrawCircleModDrawCircleModDrawCircleModdraw_circle_mod, draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region

参考其它

gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1, draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2draw_rectangle2, draw_polygondraw_polygonDrawPolygonDrawPolygonDrawPolygondraw_polygon, set_insertset_insertSetInsertSetInsertSetInsertset_insert

模块

Foundation