set_line_approx ( : : WindowHandle, Approximation : )

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.


Parameters

WindowHandle (input_control)
window -> integer
Window_id.

Approximation (input_control)
integer -> integer
Maximum deviation from the original contour.
Default value: 0
Typical range of values: 0 <= Approximation
Restriction: Approximation >= 0


Example
/* Calling */
set_line_approx(WindowHandle,Approximation) 
set_draw(WindowHandle,'margin') 
disp_region(Obj,WindowHandle).

/* correspond with */
get_region_polygon(Obj,Approximation,Row,Col) 
disp_polygon(WindowHandle,Row,Col).

Result

set_line_approx returns 2 (H_MSG_TRUE) if the parameter is correct and the window is valid. Otherwise an exception handling is raised.


Parallelization Information

set_line_approx is reentrant and processed without parallelization.


Possible Predecessors

get_line_approx


Possible Successors

disp_region


Alternatives

get_region_polygon, disp_polygon


See also

get_line_approx, set_line_style, set_draw, disp_region


Module

System



Copyright © 1996-2005 MVTec Software GmbH