set_line_approxT_set_line_approxSetLineApproxSetLineApprox (Operator)
Name
set_line_approxT_set_line_approxSetLineApproxSetLineApprox
— Festlegen der Glättung für die Konturdarstellung.
Warnung
set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApprox
ist veraltet und wird nur aus Gründen
der Rückwärtskompatibilität zur Verfügung gestellt.
Signatur
Beschreibung
set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApprox
bestimmt den Approximationsfehler bei der Darstellung
von Regionenrändern und XLD Kontouren im Fenster WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle
. Ein
Werte größer Null für ApproximationApproximationApproximationApproximationapproximation
bewirkt eine
Vereinfachung/Glättung des Linienverlaufs mit weniger Punkten und ermöglicht
eine schnellere Visualisierung. Dabei gibt ApproximationApproximationApproximationApproximationapproximation
die
maximale Abweichung des angenäherten Linienzugs vom ursprünglichen in Pixel
an (Ramer-Douglas-Peucker Algorithmus).
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Parameter
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle
(input_control) window →
HWindow, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Fenster-Handle.
ApproximationApproximationApproximationApproximationapproximation
(input_control) integer →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Maximale Abweichung von der Originalkontur.
Defaultwert: 0
Typischer Wertebereich: 0
≤
Approximation
Approximation
Approximation
Approximation
approximation
Restriktion: Approximation >= 0
Beispiel (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)
Beispiel (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);
Beispiel (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)
Beispiel (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)
Beispiel (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)
Ergebnis
set_line_approxset_line_approxSetLineApproxSetLineApproxSetLineApprox
liefert den Wert 2 (H_MSG_TRUE), falls der Parameter
korrekt ist und das Fenster gültig ist.
Ansonsten wird eine Fehlerbehandlung durchgeführt.
Vorgänger
get_line_approxget_line_approxGetLineApproxGetLineApproxGetLineApprox
Nachfolger
disp_regiondisp_regionDispRegionDispRegionDispRegion
Alternativen
get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygon
,
disp_polygondisp_polygonDispPolygonDispPolygonDispPolygon
Siehe auch
get_line_approxget_line_approxGetLineApproxGetLineApproxGetLineApprox
,
set_line_styleset_line_styleSetLineStyleSetLineStyleSetLineStyle
,
set_drawset_drawSetDrawSetDrawSetDraw
,
disp_regiondisp_regionDispRegionDispRegionDispRegion
,
disp_polygondisp_polygonDispPolygonDispPolygonDispPolygon
Modul
Foundation