mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-18 05:22:20 -05:00
Merge branch 'master' into lape-integration
This commit is contained in:
commit
26693f7d4d
@ -14,9 +14,17 @@ Recommended Simba Extensions
|
|||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
Recommended:
|
Recommended:
|
||||||
* SRL Updater (and Downloader)
|
|
||||||
* DTM Editor
|
* Extension Updater (highly recommended)
|
||||||
|
* SRL Updater (and Installer/Download)
|
||||||
* Associate Files
|
* Associate Files
|
||||||
|
* Security extension. (Implements a File and Fire wall)
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
|
||||||
|
* DTM Editor
|
||||||
|
* Paster Extension
|
||||||
|
* CRov, Crash Recovery.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
You can also use the Reflection Updater (and Downloader) for updating
|
You can also use the Reflection Updater (and Downloader) for updating
|
||||||
|
@ -35,20 +35,16 @@
|
|||||||
<LaunchingApplication PathPlusParams="/usr/bin/gnome-terminal -t 'Lazarus Run Output' -e '$(LazarusDir)/tools/runwait.sh $(TargetCmdLine)'"/>
|
<LaunchingApplication PathPlusParams="/usr/bin/gnome-terminal -t 'Lazarus Run Output' -e '$(LazarusDir)/tools/runwait.sh $(TargetCmdLine)'"/>
|
||||||
</local>
|
</local>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="3">
|
<RequiredPackages Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="LCLBase"/>
|
|
||||||
<MinVersion Major="1" Release="1" Valid="True"/>
|
|
||||||
</Item1>
|
|
||||||
<Item2>
|
|
||||||
<PackageName Value="SynEdit"/>
|
<PackageName Value="SynEdit"/>
|
||||||
<MinVersion Major="1" Valid="True"/>
|
<MinVersion Major="1" Valid="True"/>
|
||||||
</Item2>
|
</Item1>
|
||||||
<Item3>
|
<Item2>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item3>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="48">
|
<Units Count="50">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="Simba.lpr"/>
|
<Filename Value="Simba.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -308,10 +304,19 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="os_linux"/>
|
<UnitName Value="os_linux"/>
|
||||||
</Unit47>
|
</Unit47>
|
||||||
|
<Unit48>
|
||||||
|
<Filename Value="../../Units/MMLCore/tpa.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="tpa"/>
|
||||||
|
</Unit48>
|
||||||
|
<Unit49>
|
||||||
|
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit49>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="10"/>
|
<Version Value="9"/>
|
||||||
<Target>
|
<Target>
|
||||||
<Filename Value="../../Simba"/>
|
<Filename Value="../../Simba"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -33,7 +33,7 @@ uses
|
|||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, Forms, SimbaUnit, colourhistory, About, internets, debugimage,
|
Interfaces, Forms, SimbaUnit, colourhistory, About, internets, debugimage,
|
||||||
framefunctionlist, simpleanalyzer, updater, updateform, Simbasettings,
|
framefunctionlist, simpleanalyzer, updater, updateform, Simbasettings,
|
||||||
libloader, mufasabase, v_ideCodeInsight,
|
libloader, mufasabase, tpa, v_ideCodeInsight,
|
||||||
PSDump, v_ideCodeParser,
|
PSDump, v_ideCodeParser,
|
||||||
v_AutoCompleteForm, CastaliaPasLex, CastaliaPasLexTypes, CastaliaSimplePasPar,
|
v_AutoCompleteForm, CastaliaPasLex, CastaliaPasLexTypes, CastaliaSimplePasPar,
|
||||||
CastaliaSimplePasParTypes, dcpbase64, mPasLex, v_Constants, v_MiscFunctions,
|
CastaliaSimplePasParTypes, dcpbase64, mPasLex, v_Constants, v_MiscFunctions,
|
||||||
|
Binary file not shown.
@ -143,6 +143,11 @@ begin
|
|||||||
FilterPointsLine(points,radial,radius,mx,my);
|
FilterPointsLine(points,radial,radius,mx,my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure ps_FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
|
begin
|
||||||
|
FilterTPADist(TPA, maxDist);
|
||||||
|
end;
|
||||||
|
|
||||||
function ps_GetATPABounds(const ATPA: T2DPointArray): TBox;extdecl;
|
function ps_GetATPABounds(const ATPA: T2DPointArray): TBox;extdecl;
|
||||||
begin
|
begin
|
||||||
result := GetATPABounds(ATPA);
|
result := GetATPABounds(ATPA);
|
||||||
|
@ -458,6 +458,7 @@ AddFunction(@ps_FloodFillTPA,'function FloodFillTPA(const TPA : TPointArray) : T
|
|||||||
AddFunction(@ps_FilterPointsPie,'procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);');
|
AddFunction(@ps_FilterPointsPie,'procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);');
|
||||||
AddFunction(@ps_FilterPointsLine,'procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);');
|
AddFunction(@ps_FilterPointsLine,'procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);');
|
||||||
AddFunction(@ps_filterpointsdist,'procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);');
|
AddFunction(@ps_filterpointsdist,'procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);');
|
||||||
|
AddFunction(@ps_filterTPADist, 'procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);');
|
||||||
AddFunction(@ps_GetATPABounds,'function GetATPABounds(const ATPA: T2DPointArray): TBox;');
|
AddFunction(@ps_GetATPABounds,'function GetATPABounds(const ATPA: T2DPointArray): TBox;');
|
||||||
AddFunction(@ps_GetTPABounds,'function GetTPABounds(const TPA: TPointArray): TBox;');
|
AddFunction(@ps_GetTPABounds,'function GetTPABounds(const TPA: TPointArray): TBox;');
|
||||||
AddFunction(@ps_FindTPAinTPA,'function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;');
|
AddFunction(@ps_FindTPAinTPA,'function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;');
|
||||||
|
@ -67,6 +67,7 @@ function FloodFillTPA(const TPA : TPointArray) : T2DPointArray;
|
|||||||
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
||||||
procedure FilterPointsDist(var Points: TPointArray; const MinDist,MaxDist: Extended; Mx, My: Integer);
|
procedure FilterPointsDist(var Points: TPointArray; const MinDist,MaxDist: Extended; Mx, My: Integer);
|
||||||
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
||||||
|
procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
||||||
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
||||||
function GetTPABounds(const TPA: TPointArray): TBox;
|
function GetTPABounds(const TPA: TPointArray): TBox;
|
||||||
@ -1168,6 +1169,55 @@ begin
|
|||||||
Points:= P;
|
Points:= P;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{/\
|
||||||
|
Removes points in the TPA that are within maxDist of each other.
|
||||||
|
/\}
|
||||||
|
procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
|
var
|
||||||
|
c, i, j, l, h, maxDistSq: integer;
|
||||||
|
newTPA: TPointArray;
|
||||||
|
inBadElements: TBooleanArray;
|
||||||
|
begin
|
||||||
|
h := high(TPA);
|
||||||
|
l := (h + 1);
|
||||||
|
maxDistSq := (maxDist * maxDist);
|
||||||
|
|
||||||
|
setLength(inBadElements, l);
|
||||||
|
setLength(newTPA, l);
|
||||||
|
|
||||||
|
for i := 0 to h do
|
||||||
|
inBadElements[i] := false;
|
||||||
|
|
||||||
|
for i := 0 to (h - 1) do
|
||||||
|
begin
|
||||||
|
if (inBadElements[i]) then
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for j := (i + 1) to h do
|
||||||
|
begin
|
||||||
|
if (inBadElements[j]) then
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// simplified -> a^2 + b^2 <= c^2
|
||||||
|
if (((TPA[i].x - TPA[j].x) * (TPA[i].x - TPA[j].x)) + ((TPA[i].y - TPA[j].y) * (TPA[i].y - TPA[j].y)) <= maxDistSq) then
|
||||||
|
inBadElements[j] := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
c := 0;
|
||||||
|
|
||||||
|
// set the new TPA
|
||||||
|
for i := 0 to h do
|
||||||
|
if (not inBadElements[i]) then
|
||||||
|
begin
|
||||||
|
newTPA[c] := TPA[i];
|
||||||
|
inc(c);
|
||||||
|
end;
|
||||||
|
|
||||||
|
setLength(newTPA, c);
|
||||||
|
TPA := newTPA;
|
||||||
|
end;
|
||||||
|
|
||||||
{/\
|
{/\
|
||||||
Removes the points that are inside or outside the distance Dist from the point (x, y) from the TPointArray ThePoints.
|
Removes the points that are inside or outside the distance Dist from the point (x, y) from the TPointArray ThePoints.
|
||||||
/\}
|
/\}
|
||||||
|
Loading…
Reference in New Issue
Block a user