FHannes Posted August 21, 2013 Share Posted August 21, 2013 SCAR Divi 3.39.00 has been released. This version adds various new functions, as well as improvements to increase the performance of several functions. On top of that, there's the usual dose of bugfixes. Downloads: SCAR Divi - Download Changelog: Bugfixes: - [#2] Bug in CTS2 algoritm - [#15] FindBitmap(Tol) with bitmap larger than area did not always return False - SCAR's process didn't always terminate on some occasions - [#13] Code hints and code completion leaked memory - Small bugs in TPAFromCircle and TPAFromTriangle - TSCARBitmap.Resize occasionally lost image data when resizing transparent images - TIAPop, TEAPop and TPAPop removed the item from the front of the array rather than from the back New: - TSCARBitmap.Crop - procedure TPADeleteEx(var TPA: TPointArray; const Indexes: TIntArray); - procedure TIADeleteEx(var TIA: TIntArray; const Indexes: TIntArray); - procedure TEADeleteEx(var TEA: TExtArray; const Indexes: TIntArray); - function Diff(const Value1, Value2: Integer): Integer; - function DiffE(const Value1, Value2: Extended): Extended; - function InPolygon(const X, Y: Integer; const Points: TPointArray): Boolean; - function TPAFromPolygon(const Polygon: TPointArray): TPointArray; - function TIAPopEx(var TIA: TIntArray; const Front: Boolean): Integer; - function TEAPopEx(var TEA: TExtArray; const Front: Boolean): Extended; - function TPAPopEx(var TPA: TPointArray; const Front: Boolean): TPoint; Tweaks: - Greatly improved Explode(Ex) performance - Format uses string instead of AnsiString - Inc(Ex) and Dec(Ex) now accept Single, Double and Extended values (Increments are still integer) - TPAFromTriangle now takes TPoints rather than integers for coordinates - Optimized TSCARBitmap.Clone - Optimized TIAInsert, TEAInsert and TPAInsert Removed: - procedure TIAPush(var TIA: TIntArray; const Int: Integer); - procedure TEAPush(var TEA: TExtArray; const Value: Extended); - procedure TPAPush(var TPA: TPointArray; const Point: TPoint); Enjoy! ~Freddy Quote Link to comment Share on other sites More sharing options...
Janilabo Posted August 21, 2013 Share Posted August 21, 2013 Even though the changelog for this version isn't all that big, this is still one of the greatest releases, because some of those bugs were very important to get fixed. Thank you, Freddy! Quote Link to comment Share on other sites More sharing options...
slacky Posted August 22, 2013 Share Posted August 22, 2013 - function InPolygon(const X, Y: Integer; const Points: TPointArray): Boolean; - function TPAFromPolygon(const Polygon: TPointArray): TPointArray; I got a feeling I recognized these, like, about a month a go I provided Janilabos Point-Thread (at srl) with ray-tracing algorithm for just that We also created a pretty darn fast TPAFromPolygon!! I would guess you can find this in Janilabos Pumbaa.. (which I help out with every now and then/adding some "complex" algorithms)... :-P Freddy, you know what.. Some parts of SCAR could be available for a peak @ source, just saying :-) Not everything have to be closed source. - That way I can have MUCH more to complain about, and requesting improvements! =D And that way I can fucking contribute! You could have kept the old Pop-functions and renamed am to PopLeft (remove & return @ left), which is also commonly seen in a few other programming-languages, okay at least in Python:-P Anyways: GJ! Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 22, 2013 Author Share Posted August 22, 2013 - function InPolygon(const X, Y: Integer; const Points: TPointArray): Boolean; - function TPAFromPolygon(const Polygon: TPointArray): TPointArray; I got a feeling I recognized these, like, about a month a go I provided Janilabos Point-Thread (at srl) with ray-tracing algorithm for just that We also created a pretty darn fast TPAFromPolygon!! I would guess you can find this in Janilabos Pumbaa.. (which I help out with every now and then/adding some "complex" algorithms)... :-P It was suggested that I should add these. Mine also use ray tracing of course. Freddy, you know what.. Some parts of SCAR could be available for a peak @ source, just saying :-) Not everything have to be closed source.- That way I can have MUCH more to complain about, and requesting improvements! =D And that way I can fucking contribute! I'll think about it. You could have kept the old Pop-functions and renamed am to PopLeft (remove & return @ left), which is also commonly seen in a few other programming-languages, okay at least in Python:-P Well, given that this is a far more expensive operation than jsut removing an item from the end of the array, it's probably going to be used a lot less. So the PopEx functions should do. Quote Link to comment Share on other sites More sharing options...
Net4Hack Posted March 22, 2014 Share Posted March 22, 2014 Hey everyone, Can pleas someone exlplain me what 'TSCARBitmap.Crop' is doing ? Thx # N4H Quote Link to comment Share on other sites More sharing options...
FHannes Posted March 22, 2014 Author Share Posted March 22, 2014 Hey everyone, Can pleas someone exlplain me what 'TSCARBitmap.Crop' is doing ? Thx # N4H If I recall correctly, it allows you to "crop" the bitmap by cutting out a certain area of it. Quote Link to comment Share on other sites More sharing options...