ImageEn, unit ievect

TImageEnVect.SimplifyPolygon

TImageEnVect.SimplifyPolygon


Declaration

procedure SimplifyPolygon(hobj: integer; MaxPoints: integer);


Description

Approximates a high resolution polyline with a smaller low resolution polyline having fewer vertices (MaxPoints).


Example

hobj := ImageEnVect1.CreatePolygonFromEdge(100, 100, false, 25); // Creates a polygon along the edges of the image at 100, 100 position
ImageEnVect1.SimplifyPolygon(.hobj, 30);  // simplify the polygon to max 30 points


Transition Information

If you are transitioning your code to TImageEnView Layers, instead of SimplifyPolygon, use: TIEPolylineLayer.SimplifyPolygon

TIEPolylineLayer( ImageEnView1.CurrentLayer ).SimplifyPolygon();
ImageEnView1.Update();