draw_regionT_draw_regionDrawRegionDrawRegion (Operator)
Name
draw_regionT_draw_regionDrawRegionDrawRegion
— Interactive drawing of a closed region.
Signature
Description
draw_regiondraw_regionDrawRegionDrawRegionDrawRegion
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_colorSetColorSetColorSetColor
,
set_rgbset_rgbSetRgbSetRgbSetRgb
, etc. .
Pressing the right mouse button terminates the procedure. On macOS
draw_regiondraw_regionDrawRegionDrawRegionDrawRegion
can also be terminated by pressing the escape key.
Attention
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.
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
RegionRegionRegionRegionregion
(output_object) region →
objectHRegionHRegionHobject *
Interactive created region.
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle
(input_control) window →
HWindow, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Window handle.
Example (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
Example (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);
Example (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
Example (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
Example (HDevelop)
read_image(Image,'fabrik')
dev_display (Image)
draw_region(Region,WindowHandle)
reduce_domain(Image,Region,ImageReduced)
invert_image (ImageReduced, ImageInvert)
dev_display (ImageInvert)
Result
If the window is valid, draw_regiondraw_regionDrawRegionDrawRegionDrawRegion
returns 2 (H_MSG_TRUE).
If necessary, an exception is raised.
Possible Predecessors
open_windowopen_windowOpenWindowOpenWindowOpenWindow
Possible Successors
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain
,
disp_regiondisp_regionDispRegionDispRegionDispRegion
,
set_coloredset_coloredSetColoredSetColoredSetColored
,
set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidth
,
set_drawset_drawSetDrawSetDrawSetDraw
Alternatives
draw_circledraw_circleDrawCircleDrawCircleDrawCircle
,
draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipse
,
draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1
,
draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2
See also
draw_polygondraw_polygonDrawPolygonDrawPolygonDrawPolygon
,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain
,
fill_upfill_upFillUpFillUpFillUp
,
set_colorset_colorSetColorSetColorSetColor
Module
Foundation