draw_polygon — Interactive drawing of a polygon row.
draw_polygon produces an image. The region of that image spans
exactly the image points entered interactively by mouse clicks (gray values
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_polygon can also be terminated by pressing the escape key.
Painting uses that color which has been set by
set_rgb, etc. .
To put gray values on the created
PolygonRegion for further processing,
you may use the operator
The painted contour is not closed automatically, in particular it is not “filled up” either.
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.
Region, which encompasses all painted points.
draw_polygon(Polygon,WindowHandle) shape_trans(Polygon,Filled,'convex') dev_display (Filled)
If the window is valid,
draw_polygon returns 2 (H_MSG_TRUE).
If necessary, an exception is raised.