Herror ::draw_polygon (
    Hobject *PolygonRegion,
    const HTuple &WindowHandle
)
HRegion HWindow::DrawPolygon (
    
) const

Interactive drawing of a polygon row.

::draw_polygon produces an image. The region of that image spans exactly the imagepoints 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. Painting uses that color which has been set by ::set_color, ::set_rgb, etc. .

To put gray values on the created PolygonRegion for further processing, you may use the procedure ::reduce_domain.


Attention

The painted contour is not closed automatically, in particular it is not ``filled up'' either.

Output object's gray values are not defined.


Parameters

PolygonRegion (output_object)
region -> Hobject * : HRegion
Region, which encompasses all painted points.

WindowHandle (input_control)
window -> HTuple.long
Window_id.


Example
draw_polygon(&Polygon,WindowHandle) ;
convex(Polygon,&Filled) ;
disp_region(Filled,WindowHandle) ;

Result

If the window is valid, ::draw_polygon returns H_MSG_TRUE. If necessary, an exception handling is raised.


Possible Predecessors

::open_window


Possible Successors

::reduce_domain, ::disp_region, ::set_colored, ::set_line_width, ::set_draw


Alternatives

::draw_region, ::draw_circle, ::draw_rectangle1, ::draw_rectangle2, ::boundary


See also

::reduce_domain, ::fill_up, ::set_color


Module

System



Copyright © 1996-2002 MVTec Software GmbH