set_line_approxT_set_line_approxSetLineApproxSetLineApproxset_line_approx (算子)
名称
set_line_approxT_set_line_approxSetLineApproxSetLineApproxset_line_approx — 定义轮廓显示的近似误差。
警告
set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApproxset_line_approx 已过时,仅出于向后兼容性考虑而保留。
签名
描述
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 (输入控制) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
窗口句柄。
ApproximationApproximationApproximationApproximationapproximationapproximation (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Maximum deviation from the original contour.
默认值:
0
值范围:
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.否则将抛出异常。
可能的前趋
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
模块
基础