ClassesClassesClassesClasses | | | | Operators

draw_polygondraw_polygonDrawPolygondraw_polygonDrawPolygonDrawPolygon (Operator)

Name

draw_polygondraw_polygonDrawPolygondraw_polygonDrawPolygonDrawPolygon — Interactive drawing of a polygon row.

Signature

draw_polygon( : PolygonRegion : WindowHandle : )

Herror draw_polygon(Hobject* PolygonRegion, const Hlong WindowHandle)

Herror T_draw_polygon(Hobject* PolygonRegion, const Htuple WindowHandle)

Herror draw_polygon(Hobject* PolygonRegion, const HTuple& WindowHandle)

HRegion HWindow::DrawPolygon() const

void DrawPolygon(HObject* PolygonRegion, const HTuple& WindowHandle)

void HRegion::DrawPolygon(const HWindow& WindowHandle)

HRegion HWindow::DrawPolygon() const

void HOperatorSetX.DrawPolygon(
[out] IHUntypedObjectX*PolygonRegion, [in] VARIANT WindowHandle)

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

IHRegionX* HWindowX.DrawPolygon()

static void HOperatorSet.DrawPolygon(out HObject polygonRegion, HTuple windowHandle)

void HRegion.DrawPolygon(HWindow windowHandle)

HRegion HWindow.DrawPolygon()

Description

draw_polygondraw_polygonDrawPolygondraw_polygonDrawPolygonDrawPolygon produces an image. The region of that image spans exactly the image points entered interactively by mouse clicks (gray values remain undefined).

Painting in the output window happens while pressing the left mouse button. Releasing the left mouse button and repressing it at another position effects drawing a line between these two points. Pressing the right mouse button terminates the input. On macOS draw_polygondraw_polygonDrawPolygondraw_polygonDrawPolygonDrawPolygon can also be terminated by pressing the escape key. Painting uses that color which has been set by set_colorset_colorSetColorset_colorSetColorSetColor, set_rgbset_rgbSetRgbset_rgbSetRgbSetRgb, etc. .

To put gray values on the created PolygonRegionPolygonRegionPolygonRegionPolygonRegionPolygonRegionpolygonRegion for further processing, you may use the operator reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain.

Attention

The painted contour is not closed automatically, in particular it is not “filled up” either.

Output object's gray values are not defined.

Parallelization

Parameters

PolygonRegionPolygonRegionPolygonRegionPolygonRegionPolygonRegionpolygonRegion (output_object)  region objectHRegionHRegionHRegionHRegionXHobject *

Region, which encompasses all painted points.

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

Window handle.

Example (HDevelop)

draw_polygon(Polygon,WindowHandle)
shape_trans(Polygon,Filled,'convex')
dev_display (Filled)

Example (C)

draw_polygon(&Polygon,WindowHandle) ;
shape_trans(Polygon,&Filled,"convex") ;
disp_region(Filled,WindowHandle) ;

Example (HDevelop)

draw_polygon(Polygon,WindowHandle)
shape_trans(Polygon,Filled,'convex')
dev_display (Filled)

Example (HDevelop)

draw_polygon(Polygon,WindowHandle)
shape_trans(Polygon,Filled,'convex')
dev_display (Filled)

Example (HDevelop)

draw_polygon(Polygon,WindowHandle)
shape_trans(Polygon,Filled,'convex')
dev_display (Filled)

Example (HDevelop)

draw_polygon(Polygon,WindowHandle)
shape_trans(Polygon,Filled,'convex')
dev_display (Filled)

Result

If the window is valid, draw_polygondraw_polygonDrawPolygondraw_polygonDrawPolygonDrawPolygon 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_regiondraw_regionDrawRegiondraw_regionDrawRegionDrawRegion, draw_circledraw_circleDrawCircledraw_circleDrawCircleDrawCircle, draw_rectangle1draw_rectangle1DrawRectangle1draw_rectangle1DrawRectangle1DrawRectangle1, draw_rectangle2draw_rectangle2DrawRectangle2draw_rectangle2DrawRectangle2DrawRectangle2, boundaryboundaryBoundaryboundaryBoundaryBoundary

See also

reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain, fill_upfill_upFillUpfill_upFillUpFillUp, set_colorset_colorSetColorset_colorSetColorSetColor

Module

Foundation


ClassesClassesClassesClasses | | | | Operators