draw_regionT_draw_regionDrawRegionDrawRegiondraw_region (算子名称)
名称
draw_regionT_draw_regionDrawRegionDrawRegiondraw_region — Interactive drawing of a closed region.
参数签名
描述
draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region produces an image. The region of that image spans
exactly the image region entered interactively by mouse clicks (gray values
remain undefined).
Painting happens in the output window while keeping the left mouse button
pressed. The left mouse button even operates by clicking in the output window;
through this a line between the previous clicked points is drawn.
Clicking the right mouse button terminates input and closes the outline.
Subsequently the image is “filled up”. Also it contains the whole image area
enclosed by the mouse.
Painting uses that color which has been set by set_colorset_colorSetColorSetColorSetColorset_color,
set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb, etc. .
Pressing the right mouse button terminates the procedure.
注意
The output object's gray values are not defined.
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.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
区域区域区域区域区域区域 (output_object) region → objectHRegionHObjectHRegionHobject *
Interactive created region.
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Window handle.
例程 (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
例程 (C)
read_image(&Image,"fabrik");
disp_image(Image,WindowHandle);
draw_region(&Region,WindowHandle);
reduce_domain(Image,Region,&New);
regiongrowing(New,&Segmente,5,5,6,50);
set_colored(WindowHandle,12);
disp_region(Segmente,WindowHandle);
例程 (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
例程 (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
例程 (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
结果
If the window is valid, draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region returns 2 (
H_MSG_TRUE)
.
如有必要,将引发异常。
可能的前置算子
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
可替代算子
draw_circledraw_circleDrawCircleDrawCircleDrawCircledraw_circle,
draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse,
draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1,
draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2draw_rectangle2
参考其它
draw_polygondraw_polygonDrawPolygonDrawPolygonDrawPolygondraw_polygon,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
fill_upfill_upFillUpFillUpFillUpfill_up,
set_colorset_colorSetColorSetColorSetColorset_color
模块
Foundation