Interactive creation of a polygon row.
draw_polygon produces an image. The region of that image spans exactly the imagepoints entered interactively by mouse clicks (grey values remain undefined).
Painting in the current output window happens while pressing the left mouse button. Relinquishing the left mouse button and repressing it at another position effects drawing a line between these two points. Pressing the right mouse button terminates input. Painting uses that color which has been set by set_color, set_rgb, etc. .
To put grey values on the created PolygonRegion for further processing, you may use the procedure reduce_domain.
The painted contour is not closed automatically, in particular it is not "filled up" either.
Output object's grey values are not defined.
PolygonRegion (output_object) |
region -> object |
Region, which encompasses all painted points. |
draw_polygon(:Polygon::) > convex(Polygon:Filled::) > disp_region(Filled:::).
If a window is activated, draw_polygon returns TRUE. If necessary an exception is raised.
reduce_domain, disp_region, set_colored, set_line_width, set_draw
draw_region, draw_circle, draw_rectangle1, draw_rectangle2, boundary
reduce_domain, fill_up, set_color