Jump to content
FHannes

SCAR Divi 3.37 RC

Recommended Posts

I've now uploaded the release candidate for SCAR Divi 3.37. This version got slightly out of hand, as it was supposed to be a small maintenance update with just a few new features? Instead it got huge. :) If there's any more issues with this build, please report them in Mantis before Saturday, the final version should be released then.

 

Regular: http://svn.scar-divi.com/scar/

Portable: http://svn.scar-divi.com/scar_portable/

 

Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease

 

Changelog:

Bugfixes:
- [#127] Double clicking on a form element in the form designer will no longer assign an event internally
- [#136] SCAR process sometimes did not terminate
- Some selection features in color tools did not work properly
- Dragging color tools items from/to stored colors sometimes lagged or froze SCAR
- Small memory leak when loading png images
- [#133] The new FindColor(s)SpiralTol(Ex) and FindColor(s)TPATol(Ex) functions did not return the correct results
- [#139] Menu in DTM editor was detachable
- GetCurrentKeyState and GetToggleKeyState did not function correctly for TSCARWindowClient
- [#142] Some system colors were imported incorrectly
- [#143] Several dialog functions were malfunctioning
- TSCARBitmap.DC changed when TSCARBitmap.Flip() ot TSCARBitmap.Rotate() were called
- TSCARBitmap.LoadFromStr set the entire bitmap to transparant
- Error in firewall config when adding a rule
- Picked colors were added in reverse to the list

New:
- Rename button in color tools rightclick menu
- procedure TPAEdge(var TPA: TPointArray);
- Capture Client button in DTM editor Edit menu
- TTPAArtifacts = set of (taXAxis, taYAxis)
- function BmpFromTPA(const TPA: TPointArray; const FgCol, BgCol: Integer): TSCARBitmap;
- function BmpFromTPAEx(const TPA: TPointArray; const FgCol, BgCol, AfCol: Integer; const Scale: Single; const Artifacts: TTPAArtifacts): TSCARBitmap;
- function TSCARBitmap.GetPixels(const TPA: TPointArray): TIntArray;
- procedure TSCARBitmap.SetPixels(const TPA: TPointArray; const Color: Integer);
- procedure TSCARBitmap.Skew(const Horiz, Vert: Single);
- function LibsPath: string;
- function ScriptsPath: string;
- procedure TSCARBitmap.RotateEx(const Angle: Extended; const Resize: Boolean);
- procedure TSCARBitmap.SkewEx(const Horiz, Vert: Single; const Resize: Boolean);
- function StrToPoint(const Str: string): TPoint;
- function StrToPointDef(const Str: string; const Default: TPoint): TPoint;
- function PointToStr(const Point: TPoint): string;
- function StrToBox(const Str: string): TBox;
- function StrToBoxDef(const Str: string; const Default: TBox): TBox;
- procedure ExpandBox(var Box: TBox; const SizeChange: Integer);
- procedure OffsetBox(var Box: TBox; const XOffset, YOffset: Integer);
- function TPAEquals(const TPA1, TPA2: TPointArray): Boolean;
- function TIAEquals(const TIA1, TIA2: TIntArray): Boolean;
- function TEAEquals(const TEA1, TEA2: TExtArray): Boolean;
- Added all DateUtils routines: http://docwiki.embarcadero.com/Libraries/XE2/en/System.DateUtils#Routines
- function BoxCenter(const Box: TBox): TPoint;
- procedure TPADistToPoint(const TPA: TPointArray; const Point: TPoint; out MinDist, MaxDist: Extended);
- procedure TPADistToPointEx(const TPA: TPointArray; const Point: TPoint; out MinDist, MaxDist: Extended; out MinPoint, MaxPoint: TPoint);
- Option to toggle template completion
- TSCARWindowClient.Scancodes

Tweaks:
- TSCARBitmap's SaveToBmp, SaveToJpeg and SaveToPng now creates the target folder if it does not exist
- It is now possible to ctrl+click to add an item to the selection in color tools
- Huge performance improvements for all TPAFilterX and TPAExtractX functions
- Huge performance improvements for TPAIntersect and TIAIntersect
- CreateMessageDialog tied into resource manager for forms
- Added thread-safety for CreateMessageDialog, MessageDlg, MessageDlgPos, TaskMessageDlg, TaskMessageDlgPos, ShowMessage,
    ShowMessageFmt, ShowMessagePos, InputBox and InputQuery
- Removed the HelpCtx parameter from MessageDlg, MessageDlgPos, TaskMessageDlg and TaskMessageDlgPos
- ImageBox/InputBox in Target Client renamed to ImageArea/InputArea for consistency
- More accurate rotation algorithm for TSCARBitmap.Rotate()
- The databox in the color picker is now wider to accommodate the large coordinates on modern screens
- Moved color squares in the color picker's databox to the left to be consistent with the datapicker
- Color picker magnifier now has red corners around the center pixel, the bitmap picker has been adjusted accordingly
- The databox in the color picker now repositions around your cursor when it reaches the edges of the monitor your cursor is currently on
- function Distance(const X1, Y1, X2, Y2: Integer): Extended; (now returns extended)
- Editing the name of items in color tools is no longer possible through clicking
- The delete key now allows you to delete items from color tools as well
- You can now group colors (and groups) together into groups in the color tools

 

Enjoy :)

 

~Freddy

Link to comment
Share on other sites

K, I'll check when I get home for any issues. A fine job indeed Freddy! This shall be the greatest version since 3.35!

 

Do you want me to put {IFNDEF 337_UP} around functions that OSI has, that you added? Or just rip them out right when it is released. Or do both maybe.

 

Just rip them out... You're forcing people to 3.37, so it's just deprecated code.

Link to comment
Share on other sites

I keep getting an error saying the TSCARBitmap.SetPixels functions argument is out of bounds. I may be doing something wrong but i don see the problem.

 

@Freddy you should create a right click option for errors in the message box so you can copy them. Would make posting errors a little easier.

 

[scar]

program New;

var

BMP: TSCARBitmap;

TPA: TPointArray;

 

begin

TPA := [Point(249,0), Point(249,500), Point(0,249), Point(500,249)];

BMP := TSCARBitmap.Create('');

try

BMP.SetSize(500, 500);

BMP.SetPixels(TPA, 255);

DebugBitmap(BMP);

finally

BMP.Free;

end;

end.

[/scar]

Link to comment
Share on other sites

I keep getting an error saying the TSCARBitmap.SetPixels functions argument is out of bounds. I may be doing something wrong but i don see the problem.

 

@Freddy you should create a right click option for errors in the message box so you can copy them. Would make posting errors a little easier.

 

[scar]

program New;

var

BMP: TSCARBitmap;

TPA: TPointArray;

 

begin

TPA := [Point(249,0), Point(249,500), Point(0,249), Point(500,249)];

BMP := TSCARBitmap.Create('');

try

BMP.SetSize(500, 500);

BMP.SetPixels(TPA, 255);

DebugBitmap(BMP);

finally

BMP.Free;

end;

end.

[/scar]

Well mate, points (249,500) and (500,249) are indeed out of bounds.

Bitmap with size 500,500 means coordinates X: 0-499 & Y: 0-499.

So those points should be (499,249) / (249,499) instead (or add size 501,501 to bitmap).

Meaning there's no problem with .SetPixels() property, you need to fix your code. :P

 

-Jani

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...