mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-30 14:50:18 -05:00
New TPA function
This commit is contained in:
parent
1575c1ec11
commit
1cd909537d
@ -46,7 +46,7 @@ uses
|
||||
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
|
||||
|
||||
const
|
||||
SimbaVersion = 650;
|
||||
SimbaVersion = 655;
|
||||
|
||||
type
|
||||
|
||||
|
@ -218,6 +218,11 @@ begin
|
||||
result := MergeATPA(ATPA);
|
||||
end;
|
||||
|
||||
procedure ps_AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray);
|
||||
begin
|
||||
AppendTPA(tpa,ToAppend);
|
||||
end;
|
||||
|
||||
function ps_TPAFromBox(const Box : TBox) : TPointArray; extdecl;
|
||||
begin
|
||||
result := TPAFromBox(box);
|
||||
|
@ -356,6 +356,7 @@ AddFunction(@ps_TPAtoATPAEx,'function TPAtoATPAEx(const TPA: TPointArray; w, h:
|
||||
AddFunction(@ps_TPAtoATPA,'function TPAtoATPA(const TPA: TPointArray; Dist: Integer): T2DPointArray;');
|
||||
AddFunction(@ps_CombineIntArray,'function CombineIntArray(const Ar1, Ar2: TIntegerArray): TIntegerArray;');
|
||||
AddFunction(@ps_MergeATPA,'function MergeATPA(const ATPA : T2DPointArray) : TPointArray;');
|
||||
AddFunction(@ps_AppendTPA,'procedure AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray);');
|
||||
AddFunction(@ps_TPAFromBox,'function TPAFromBox(const Box : TBox) : TPointArray;');
|
||||
AddFunction(@ps_RotatePoints,'function RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray ;');
|
||||
AddFunction(@ps_FindTPAEdges,'function FindTPAEdges(const p: TPointArray): TPointArray;');
|
||||
|
@ -75,7 +75,8 @@ function GetSamePointsATPA(const ATPA : T2DPointArray; var Matches : TPointArray
|
||||
function FindGapsTPA(const TPA: TPointArray; MinPixels: Integer): T2DPointArray;
|
||||
procedure SortCircleWise(var tpa: TPointArray; const cx, cy, StartDegree: Integer; SortUp, ClockWise: Boolean);
|
||||
procedure LinearSort(var tpa: TPointArray; cx, cy, sd: Integer; SortUp: Boolean);
|
||||
Function MergeATPA(const ATPA : T2DPointArray) : TPointArray;
|
||||
function MergeATPA(const ATPA : T2DPointArray) : TPointArray;
|
||||
procedure AppendTPA(var TPA : TPointArray; const ToAppend : TPointArray);
|
||||
function TPAFromBox(const Box : TBox) : TPointArray;
|
||||
Function RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray ;
|
||||
Function RotatePoint(Const p: TPoint; angle, mx, my: Extended): TPoint; inline;
|
||||
@ -1668,10 +1669,20 @@ begin;
|
||||
end;
|
||||
|
||||
|
||||
procedure AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray);
|
||||
var
|
||||
l,lo,i : integer;
|
||||
begin
|
||||
l := high(ToAppend);
|
||||
lo := length(TPA);
|
||||
setlength(TPA,lo + l + 1);
|
||||
for i := 0 to l do
|
||||
TPA[i + lo] := ToAppend[i];
|
||||
end;
|
||||
|
||||
{/\
|
||||
Returns a TPointArray of a the full given Box.
|
||||
/\}
|
||||
|
||||
function TPAFromBox(const Box : TBox) : TPointArray;
|
||||
var
|
||||
x, y: integer;
|
||||
|
Loading…
Reference in New Issue
Block a user