Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function TPAReduce1(TPA:TPointArray): TPointArray;
- var
- b:TBox;
- mat:TByteMatrix;
- edges:TPointArray;
- begin
- B := GetTPABounds(TPA);
- OffsetTPA(TPA, Point(-B.x1, -B.y1));
- SetLength(Mat, B.height(),B.width());
- se.SetData(mat, TPA, TByteArray([1]));
- edges := se.TPAEdges(TPA);
- se.SetData(mat, edges, TByteArray([0]));
- Result := se.Indices(mat, 1, CMP_EQ);
- OffsetTPA(Result, Point(B.x1, B.y1));
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement