set_line_approxT_set_line_approxSetLineApproxSetLineApprox (Operator)

Name

set_line_approxT_set_line_approxSetLineApproxSetLineApprox — Define the approximation error for contour display.

Warning

set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApprox is obsolete and is only provided for reasons of backward compatibility.

Signature

set_line_approx( : : WindowHandle, Approximation : )

Herror T_set_line_approx(const Htuple WindowHandle, const Htuple Approximation)

void SetLineApprox(const HTuple& WindowHandle, const HTuple& Approximation)

void HWindow::SetLineApprox(Hlong Approximation) const

static void HOperatorSet.SetLineApprox(HTuple windowHandle, HTuple approximation)

void HWindow.SetLineApprox(int approximation)

Description

set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApprox defines the approximation error for region and xld contour display in the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle. ApproximationApproximationApproximationApproximationapproximation values greater than zero cause an approximation of line strokes using less points. This may enable faster and in some cases smoother visualization. The parameter describes the maximal deviation in pixels of the approximated contour from the original contour (Ramer-Douglas-Peucker algorithm).

Execution Information

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

ApproximationApproximationApproximationApproximationapproximation (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Maximum deviation from the original contour.

Default value: 0

Typical range of values: 0 ≤ Approximation Approximation Approximation Approximation approximation

Restriction: Approximation >= 0

Example (HDevelop)

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

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

Example (C)

/* Calling... */
T_set_line_approx(WindowHandle,Approximation);
create_tuple_s(mode,"margin");
T_set_draw(WindowHandle, mode);
destroy_tuple(mode);
T_disp_region(Obj,WindowHandle);

/* ...corresponds with */
create_tuple_i(&approximation,0);
create_tuple(&row,0);
create_tuple(&col,0);
T_get_region_polygon(Obj,approximation,&row,&col);
destroy_tuple(approximation);
T_disp_polygon(WindowHandle,row,col);
destroy_tuple(row); destroy_tuple(col);

Example (HDevelop)

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

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

Example (HDevelop)

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

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

Example (HDevelop)

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

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

Result

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

Possible Predecessors

get_line_approxget_line_approxGetLineApproxGetLineApproxGetLineApprox

Possible Successors

disp_regiondisp_regionDispRegionDispRegionDispRegion

Alternatives

get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygon, disp_polygondisp_polygonDispPolygonDispPolygonDispPolygon

See also

get_line_approxget_line_approxGetLineApproxGetLineApproxGetLineApprox, set_line_styleset_line_styleSetLineStyleSetLineStyleSetLineStyle, set_drawset_drawSetDrawSetDrawSetDraw, disp_regiondisp_regionDispRegionDispRegionDispRegion, disp_polygondisp_polygonDispPolygonDispPolygonDispPolygon

Module

Foundation