Define the approximation error for contour display.
::set_line_approx defines the approximation error for region contour display in the window. Approximation values greater than zero cause a polygon approximation = smoothing (with a maximum polygon/contour deviation of Approximation pixel). The approximation algorithm is the same as in ::get_region_polygon. ::set_line_approx is important for contour output via ::set_line_style.
|
WindowHandle (input_control) |
window -> HTuple.long |
| Window_id. | |
|
Approximation (input_control) |
integer -> HTuple.long |
| Maximum deviation from the original contour. | |
| Default value: 0 | |
| Typical range of values: 0 <= Approximation | |
| Restriction: Approximation >= 0 | |
/* Calling */ set_line_approx(WindowHandle,Approximation) ; set_draw(WindowHandle,"margin") ; disp_region(Obj,WindowHandle) ; /* correspond with */ Htuple Approximation,Row,Col, WindowHandleTuple ; create_tuple(&Approximation,1) ; set_i(Approximation,0,0) ; create_tuple(&WindowHandleTuple,1) ; set_i(WindowHandleTuple,WindowHandle, 0) ; T_get_region_polygon(Obj,Approximation,&Row,&Col) ; T_disp_polygon(WindowHandleTuple,Row,Col) ;
::set_line_approx returns H_MSG_TRUE if the parameter is correct and the window is valid. Otherwise an exception handling is raised.
::get_region_polygon, ::disp_polygon
::get_line_approx, ::set_line_style, ::set_draw, ::disp_region
System