Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MSSL_TPABreakdown(TPA: TPointArray; breakMethod: MSSL_TBreakMethod; breakDist: Integer; control: Boolean; controlMethod: MSSL_TControlMethod; controlMinimum, controlMaximum: Integer): T2DPointArray;
- var
- h, i: Integer;
- begin
- h := High(TPA);
- case (h > -1) of
- True:
- begin
- case breakMethod of
- bm_Split: Result := SplitTPA(TPA, breakDist);
- bm_Group: Result := TPAGroup(TPA, breakDist);
- end;
- if control then
- begin
- MSSL_IntSetMin(controlMinimum, 0);
- MSSL_IntSetMin(controlMaximum, 0);
- if (controlMinimum > controlMaximum) then
- Swap(controlMinimum, controlMaximum);
- case controlMethod of
- cm_Extract: MSSL_ATPAExtractSizeEx(Result, controlMinimum, controlMaximum);
- cm_Filter: MSSL_ATPAFilterSizeEx(Result, controlMinimum, controlMaximum);
- end;
- end;
- end;
- False: SetLength(Result, 0);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment