freddy1990
Active Member
SCAR Divi 3.38.00 has been released. This version was scheduled to be released on the 21st and has not gone through the RC stage, however, due to a critical bug in several TIA/TEA functions (#187), I've decided to push the release as soon as possible. If any more bugs should surface, they will be fixed in 3.38.01. This build offers a huge amount of new functions which are now part of SCAR's scripting API.
Downloads: http://www.scar-divi.com/index.php?page=download
Changelog:
Enjoy!
~Freddy
Downloads: http://www.scar-divi.com/index.php?page=download
Changelog:
Code:
Bugfixes:
- Possibly critical fixes for several TIA functions: TIAIntersect, TIAUnique and TIAInTIA (+ TEA equivalents)
- [#175] Saving an untitled file doesn't update the program title
- [#187] Bug with certain data sets in several TIA and TEA functions
New:
- procedure ReplaceColors(const Bmp: TSCARBitmap; const Colors: TIntArray; const NewColor: Integer);
- procedure ReplaceColorsTol(const Bmp: TSCARBitmap; const Colors: TIntArray; const NewColor, Tol: Integer);
- function RandomTIA(const Count, Range: Integer): TIntArray;
- function RandomTIAEx(const Count, Range: Integer; const AllowDuplicates: Boolean): TIntArray;
- procedure OffsetTEA(var TEA: TExtArray; const Offset: Extended);
- function TEAInsert(var TEA: TExtArray; const Index: Integer; const Ext: Extended): Integer;
- function InvertColor(const Color: Integer): Integer;
- TSCARBitmap.Invert
- function SpiralPoint(const Pos: Cardinal): TPoint;
- function SpiralPointEx(const Pos: Cardinal; const Origin: TPoint): TPoint;
- function SpiralPos(const Pt: TPoint): Cardinal;
- function SpiralPosEx(const Pt, Origin: TPoint): Cardinal;
- procedure SortTPASpiral(var TPA: TPointArray);
- procedure SortTPASpiralEx(var TPA: TPointArray; const Point: TPoint);
- function CopyTIA(const TIA: TIntArray): TIntArray;
- function CopyTIAEx(const TIA: TIntArray; const Index, Count: Integer): TIntArray;
- function ATPADelete(var ATPA: T2DPointArray; const Index: Integer): TPointArray;
- function ATIADelete(var ATIA: T2DIntArray; const Index: Integer): TIntArray;
- function ATPAContains(const ATPA: T2DPointArray; const TPA: TPointArray): Boolean;
- function ATIAContains(const ATIA: T2DIntArray; const TIA: TIntArray): Boolean;
- function PermuteTPA(const TPA: TPointArray): T2DPointArray;
- function PermuteTIA(const TIA: TIntArray): T2DIntArray;
- procedure TIAFreq(const TIA: TIntArray; out Values, Frequencies: TIntArray);
- procedure TIARelFreq(const TIA: TIntArray; out Values: TIntArray; out Frequencies: TExtArray);
- procedure TPAFreq(const TPA: TPointArray; out Values: TPointArray; out Frequencies: TIntArray);
- procedure TPARelFreq(const TPA: TPointArray; out Values: TPointArray; out Frequencies: TExtArray);
- procedure TEAFreq(const TEA: TExtArray; out Values: TExtArray; out Frequencies: TIntArray);
- procedure TEARelFreq(const TEA: TExtArray; out Values, Frequencies: TExtArray);
- procedure TEARange(const TEA: TExtArray; out Lo, Hi: Extended);
- function CombineTEA(const TEA1, TEA2: TExtArray): TExtArray;
- procedure SortTEA(var TEA: TExtArray);
- procedure SortTEAEx(var TEA: TExtArray; const Ext: Extended);
- function TEAMean(const TEA: TExtArray): Extended;
- function TEASum(const TEA: TExtArray): Extended;
- procedure TEARemove(var TEA: TExtArray; const Ext: Extended);
- procedure TEARemoveEx(var TEA: TExtArray; const Ext: Extended; const All: Boolean);
- function CopyTEA(const TEA: TExtArray): TExtArray;
- function CopyTEAEx(const TEA: TExtArray; const Index, Count: Integer): TExtArray;
- procedure TIAAdd(var TIA: TIntArray; const Value: Integer); (Alias: OffsetTIA)
- procedure TIAAddEx(var TIA: TIntArray; const Values: TIntArray);
- procedure FillTIA(var TIA: TIntArray; const Int: Integer);
- procedure FillTIAEx(var TIA: TIntArray; const Values: TIntArray);
- procedure TIASubtract(var TIA: TIntArray; const Value: Integer);
- procedure TIASubtractEx(var TIA: TIntArray; const Values: TIntArray);
- procedure TIAMultiply(var TIA: TIntArray; const Value: Integer);
- procedure TIAMultiplyEx(var TIA: TIntArray; const Values: TIntArray);
- procedure TIADivide(var TIA: TIntArray; const Value: Integer);
- procedure TIADivideEx(var TIA: TIntArray; const Values: TIntArray);
- function TIAToTEA(const TIA: TIntArray): TExtArray;
- procedure TEAAdd(var TEA: TExtArray; const Value: Extended); (Alias: OffsetTEA)
- procedure TEAAddEx(var TEA: TExtArray; const Values: TExtArray);
- procedure FillTEA(var TEA: TExtArray; const Value: Extended);
- procedure FillTEAEx(var TEA: TExtArray; const Values: TExtArray);
- procedure TEASubtract(var TEA: TExtArray; const Value: Extended);
- procedure TEASubtractEx(var TEA: TExtArray; const Values: TExtArray);
- procedure TEAMultiply(var TEA: TExtArray; const Value: Extended);
- procedure TEAMultiplyEx(var TEA: TExtArray; const Values: TExtArray);
- procedure TEADivide(var TEA: TExtArray; const Value: Extended);
- procedure TEADivideEx(var TEA: TExtArray; const Values: TExtArray);
- procedure FillTPA(var TPA: TPointArray; const Value: TPoint);
- procedure FillTPAEx(var TPA: TPointArray; const Values: TPointArray);
- procedure Write(x);
- function RoundTEA(const TEA: TExtArray): TIntArray;
- function TruncTEA(const TEA: TExtArray): TIntArray;
- function FloorTEA(const TEA: TExtArray): TIntArray;
- function CeilTEA(const TEA: TExtArray): TIntArray;
- procedure TIAPush(var TIA: TIntArray; const Value: Integer);
- function TIAPop(var TIA: TIntArray): Integer;
- procedure TPAPush(var TPA: TPointArray; const Point: TPoint);
- function TPAPop(var TPA: TPointArray): TPoint;
- procedure TEAPush(var TEA: TExtArray; const Value: Extended);
- function TEAPop(var TEA: TExtArray): Extended;
- function TIAMedian(const TIA: Integer): Extended;
- function TEAMedian(const TEA: TExtArray): Extended;
- procedure SortTPAByColumn(var TPA: TPointArray);
- TIntegerArray = TIntArray (alias)
- TExtendedArray = TExtArray (alias)
- TStringArray = TStrArray (alias)
- TBooleanArray = TBoolArray (alias)
- procedure TIAReplace(var TIA: TIntArray; const OldValue, NewValue: Integer);
- procedure TIAReplaceEx(var TIA: TIntArray; const OldValues: TIntArray; const NewValue: Integer);
- procedure TEAReplace(var TEA: TExtArray; const OldValue, NewValue: Extended);
- procedure TEAReplaceEx(var TEA: TExtArray; const OldValues: TExtArray; const NewValue: Extended);
- procedure TPAReplace(var TPA: TPointArray; const OldPoint, NewPoint: TPoint);
- procedure TPAReplaceEx(var TPA: TPointArray; const OldPoints: TPointArray; const NewPoint: TPoint);
- procedure ReverseTEA(var TEA: TExtArray);
- function TPAZip(const XValues, YValues: TIntArray): TPointArray;
- procedure TPAUnzip(const TPA: TPointArray; out XValues, YValues: TIntArray);
- SCAR338-00_UP define (Where 00 is the minor version)
- function ReadFileLine(const FileNum: Integer; out Str: string): Boolean;
- function WriteFileLine(const FileNum: Integer; const Str: string): Boolean;
Tweaks:
- TPAMiddle => TPAMean
- SortATPAByMiddle => SortATPAByMean
- SortATPAByMiddleEx => SortATPAByMeanEx
- Huge performance improvements for StrToTIA
- TIAMean now throws an exception when an empty array is passed
Removed:
- procedure TPASort(var TPA: TPointArray); (alias: SortTPA)
- procedure TPASortEx(var TPA: TPointArray; const Point: TPoint); (alias: SortTPAEx)
- function AMax(const TIA: TIntArray): Integer; (alias: TIAMax)
- function AMin(const TIA: TIntArray): Integer; (alias: TIAMin)
- function TPAMiddleEx(const TPA: TPointArray; out x, y: Integer): Boolean;
- procedure BubbleSort(var Values: TIntArray);
- procedure BubbleSortB(var Values: TIntArray);
- procedure QuickSort(var Values: TIntArray);
- function Average(const Values: TExtArray): Extended; (alias: TEAMean)
Enjoy!
~Freddy

