ClassesClassesClassesClasses | | | | Operators

draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion (Operator)

Name

draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion — Interactive drawing of a closed region.

Signature

draw_region( : Region : WindowHandle : )

Herror draw_region(Hobject* Region, const Hlong WindowHandle)

Herror T_draw_region(Hobject* Region, const Htuple WindowHandle)

Herror draw_region(Hobject* Region, const HTuple& WindowHandle)

HRegion HWindow::DrawRegion() const

void DrawRegion(HObject* Region, const HTuple& WindowHandle)

void HRegion::DrawRegion(const HWindow& WindowHandle)

HRegion HWindow::DrawRegion() const

void HOperatorSetX.DrawRegion(
[out] IHUntypedObjectX*Region, [in] VARIANT WindowHandle)

void HRegionX.DrawRegion([in] IHWindowX* WindowHandle)

IHRegionX* HWindowX.DrawRegion()

static void HOperatorSet.DrawRegion(out HObject region, HTuple windowHandle)

void HRegion.DrawRegion(HWindow windowHandle)

HRegion HWindow.DrawRegion()

Description

draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion 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_colorSetColorset_colorSetColorSetColor, set_rgbset_rgbSetRgbset_rgbSetRgbSetRgb, etc. .

Pressing the right mouse button terminates the procedure. On OS X draw_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion can also be terminated by pressing the escape key.

Attention

The output object's gray values are not defined.

Parallelization

Parameters

RegionRegionRegionRegionRegionregion (output_object)  region objectHRegionHRegionHRegionHRegionXHobject *

Interactive created region.

WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Window identifier.

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)

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_regionDrawRegiondraw_regionDrawRegionDrawRegion returns 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow

Possible Successors

reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain, disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion, set_coloredset_coloredSetColoredset_coloredSetColoredSetColored, set_line_widthset_line_widthSetLineWidthset_line_widthSetLineWidthSetLineWidth, set_drawset_drawSetDrawset_drawSetDrawSetDraw

Alternatives

draw_circledraw_circleDrawCircledraw_circleDrawCircleDrawCircle, draw_ellipsedraw_ellipseDrawEllipsedraw_ellipseDrawEllipseDrawEllipse, draw_rectangle1draw_rectangle1DrawRectangle1draw_rectangle1DrawRectangle1DrawRectangle1, draw_rectangle2draw_rectangle2DrawRectangle2draw_rectangle2DrawRectangle2DrawRectangle2

See also

draw_polygondraw_polygonDrawPolygondraw_polygonDrawPolygonDrawPolygon, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain, fill_upfill_upFillUpfill_upFillUpFillUp, set_colorset_colorSetColorset_colorSetColorSetColor

Module

Foundation


ClassesClassesClassesClasses | | | | Operators