Skip to content

draw_circleDrawCircleDrawCircledraw_circleT_draw_circleπŸ”—

Short descriptionπŸ”—

draw_circleDrawCircleDrawCircledraw_circleT_draw_circle β€” Interactive drawing of a circle.

SignatureπŸ”—

draw_circle( window WindowHandle, out circle.center.y Row, out circle.center.x Column, out circle.radius Radius )void DrawCircle( const HTuple& WindowHandle, HTuple* Row, HTuple* Column, HTuple* Radius )static void HOperatorSet.DrawCircle( HTuple windowHandle, out HTuple row, out HTuple column, out HTuple radius )def draw_circle( window_handle: HHandle ) -> Tuple[float, float, float]

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

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

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

DescriptionπŸ”—

draw_circleDrawCircle 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 Radiusradiusradius’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 Radiusradiusradius 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.

AttentionπŸ”—

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.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

WindowHandlewindowHandlewindow_handle (input_control) window β†’ (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Rowrowrow (output_control) circle.center.y β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Barycenter’s row index.

Columncolumncolumn (output_control) circle.center.x β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Barycenter’s column index.

Radiusradiusradius (output_control) circle.radius β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Circle’s radius.

ExampleπŸ”—

(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)\;

ResultπŸ”—

draw_circleDrawCircle returns 2 (H_MSG_TRUE) if the window is valid. If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

open_windowOpenWindow

Possible successors

reduce_domainReduceDomain, disp_regionDispRegion, set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw

Alternatives

draw_circle_modDrawCircleMod, draw_ellipseDrawEllipse, draw_regionDrawRegion

See also

gen_circleGenCircle, draw_rectangle1DrawRectangle1, draw_rectangle2DrawRectangle2, draw_polygonDrawPolygon

ModuleπŸ”—

Foundation