ClassesClassesClassesClasses | | | | Operators

set_line_approxset_line_approxSetLineApproxset_line_approxSetLineApproxSetLineApprox (Operator)

Name

set_line_approxset_line_approxSetLineApproxset_line_approxSetLineApproxSetLineApprox — Define the approximation error for contour display.

Signature

set_line_approx( : : WindowHandle, Approximation : )

Herror set_line_approx(const Hlong WindowHandle, const Hlong Approximation)

Herror T_set_line_approx(const Htuple WindowHandle, const Htuple Approximation)

Herror set_line_approx(const HTuple& WindowHandle, const HTuple& Approximation)

void HWindow::SetLineApprox(const HTuple& Approximation) const

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

void HWindow::SetLineApprox(Hlong Approximation) const

void HOperatorSetX.SetLineApprox(
[in] VARIANT WindowHandle, [in] VARIANT Approximation)

void HWindowX.SetLineApprox([in] Hlong Approximation)

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

void HWindow.SetLineApprox(int approximation)

Description

set_line_approxset_line_approxSetLineApproxset_line_approxSetLineApproxSetLineApprox defines the approximation error for region contour display in the window. ApproximationApproximationApproximationApproximationApproximationapproximation values greater than zero cause a polygon approximation = smoothing (with a maximum polygon/contour deviation of ApproximationApproximationApproximationApproximationApproximationapproximation pixel). The approximation algorithm is the same as in get_region_polygonget_region_polygonGetRegionPolygonget_region_polygonGetRegionPolygonGetRegionPolygon. set_line_approxset_line_approxSetLineApproxset_line_approxSetLineApproxSetLineApprox is important for contour output via set_line_styleset_line_styleSetLineStyleset_line_styleSetLineStyleSetLineStyle.

Parallelization

Parameters

WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Window_id.

ApproximationApproximationApproximationApproximationApproximationapproximation (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Maximum deviation from the original contour.

Default value: 0

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

Restriction: Approximation >= 0

Example (HDevelop)

* 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)

Example (C)

/* 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) ;

Example (HDevelop)

* 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)

Example (HDevelop)

* 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)

Example (HDevelop)

* 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)

Example (HDevelop)

* 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_approxset_line_approxSetLineApproxset_line_approxSetLineApproxSetLineApprox 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_approxGetLineApproxget_line_approxGetLineApproxGetLineApprox

Possible Successors

disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion

Alternatives

get_region_polygonget_region_polygonGetRegionPolygonget_region_polygonGetRegionPolygonGetRegionPolygon, disp_polygondisp_polygonDispPolygondisp_polygonDispPolygonDispPolygon

See also

get_line_approxget_line_approxGetLineApproxget_line_approxGetLineApproxGetLineApprox, set_line_styleset_line_styleSetLineStyleset_line_styleSetLineStyleSetLineStyle, set_drawset_drawSetDrawset_drawSetDrawSetDraw, disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion

Module

Foundation


ClassesClassesClassesClasses | | | | Operators