set_line_approxT_set_line_approxSetLineApproxSetLineApproxset_line_approx (算子名称)

名称

set_line_approxT_set_line_approxSetLineApproxSetLineApproxset_line_approx — Define the approximation error for contour display.

Warning

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

参数签名

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)

def set_line_approx(window_handle: HHandle, approximation: int) -> None

描述

set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApproxset_line_approx defines the approximation error for region and xld contour display in the window WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle. ApproximationApproximationApproximationApproximationapproximationapproximation 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).

运行信息

参数表

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

ApproximationApproximationApproximationApproximationapproximationapproximation (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Maximum deviation from the original contour.

Default: 0

Value range: 0 ≤ Approximation Approximation Approximation Approximation approximation approximation

例程 (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)

例程 (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);

例程 (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)

例程 (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)

例程 (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)

结果

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

可能的前置算子

get_line_approxget_line_approxGetLineApproxGetLineApproxGetLineApproxget_line_approx

可能的后置算子

disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region

可替代算子

get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon, disp_polygondisp_polygonDispPolygonDispPolygonDispPolygondisp_polygon

参考其它

get_line_approxget_line_approxGetLineApproxGetLineApproxGetLineApproxget_line_approx, set_line_styleset_line_styleSetLineStyleSetLineStyleSetLineStyleset_line_style, set_drawset_drawSetDrawSetDrawSetDrawset_draw, disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region, disp_polygondisp_polygonDispPolygonDispPolygonDispPolygondisp_polygon

模块

Foundation