Main
2011-10-09 23:42:29
In MSI, they show debugatpa/tpa bounds within smart instead of making a popup. How could I do that ?
2011-10-09 23:42:29
2011-10-10 00:03:48
2011-10-10 00:13:53
2011-10-10 12:57:17
2011-10-10 12:59:01
2011-10-10 15:51:03
2011-10-10 16:45:17
program new;
{$DEFINE SMART}
{$i srl/srl.scar}
{$i srl/srl/misc/paintsmart.scar}
var
tpa: TPointArray;
i, t: integer;
begin
smart_Server := 152;
smart_Members := False;
smart_Signed := True;
smart_SuperDetail := False;
setupSRL;
clearDebug;
SMART_SetupDebug();
clearRSCanvas(SMART_Canvas.canvas);
setLength(tpa, 50000);
for i := 0 to high(tpa) do
begin
tpa[i].x := randomRange(0, MIX2);
tpa[i].y := randomRange(0, MIY2);
end;
t := (getSystemTime + 10000);
while (getSystemTime < t) do
smart_DrawDots(tpa);
end.
2011-10-10 17:39:20
From: Coh3n
blabla Will help!
setLength(tpa, 50000);
for i := 0 to high(tpa) do
begin
tpa[i].x := randomRange(0, MIX2);
tpa[i].y := randomRange(0, MIY2);
end;
t := (getSystemTime + 10000);
while (getSystemTime < t) do
smart_DrawDots(tpa);
end.
2011-10-10 20:49:21
2011-10-10 20:54:00
2011-10-10 20:58:50
2011-10-10 21:16:26
2011-10-10 21:29:09
From: MainIf you call SMART_DrawDots it only draws the TPA, the bounds should be easily seen, unless I'm missing something?
I could see it drawing some small red bits on my screen with my cwer ^^. So its working atleast:P
But could you post a sample script on how to make it should atpa bounds?
2011-10-10 21:34:34
2011-10-10 21:36:59
2011-10-10 21:48:46
2011-10-10 22:27:56
From: MainI'm nto sure what you mean. Do you want boxes around the TPA bounds? If so, you can do:
I see the colored regions now:P Is it suppose to show labeled bounds? Or I'd have to do that my self with tbox?
for i := 0 to high(ATPA) do
SMART_DrawBoxEx(false, getTPABounds(ATPA[i]), clGreen);
2011-10-10 22:32:54

2011-10-10 22:35:24
2011-10-10 22:38:29
2011-10-11 01:07:58
2011-10-11 01:43:29
From: masterBBUnless it's new, that's not valid syntax in PS.
for(var i := 0; i < High(YourATPA); inc(i)) do
SMART_DrawBoxEx(true,GetTPABounds(YourATPA),clRed);
2011-10-11 03:40:54
From: Coh3n
Unless it's new, that's not valid syntax in PS.
for i := 0 to high(YourATPA) do
SMART_DrawBoxEx(false,GetTPABounds(YourATPA[i]),clRed);