Wizzup?
2010-10-10 14:44:37
Hi,
I quickly wrote up a radial aid, since the old one rather huge and could be done in a much more simple manner.
AFAIK it works the same as the old one. I can't think of a reason for this one not working exactly like radialwalk, since the last time I had a look at radialwalk it used FilterPointsPie too. (That's why it was written in the first place)
Perhaps someone wants to make it a bit more pretty or turn it into an extension? But please KISS. (Keep It Simple Silly)
I quickly wrote up a radial aid, since the old one rather huge and could be done in a much more simple manner.
AFAIK it works the same as the old one. I can't think of a reason for this one not working exactly like radialwalk, since the last time I had a look at radialwalk it used FilterPointsPie too. (That's why it was written in the first place)
program new;
var
TPA: TPointArray;
B: TBox;
V: String;
R1, R2: Integer;
Bmp: Integer;
BmpRef: TMufasaBitmap;
begin
B.X1 := 0;
B.Y1 := 0
B.X2 := 300;
B.Y2 := 300;
TPA := TPAFromBox(B);
InputQuery('Input degree #1', 'Please type the first degree', V);
try
R1 := StrToInt(V);
except
writeln('Invalid degree');
TerminateScript;
end;
V := '';
InputQuery('Input degree #2', 'Please type the second degree', V);
try
R2 := StrToInt(V);
except
writeln('Invalid degree');
TerminateScript;
end;
Writeln(Format('Degrees: (%d, %d)', [R1, R2]));
FilterPointsPie(TPA, extended(R1), extended(R2), 0, 150, 150, 150);
Bmp := CreateBitmap(300, 300);
BmpRef := GetMufasaBitmap(Bmp);
BmpRef.FastDrawClear(clWhite);
BmpRef.DrawTPA(TPA, clRed);
//BmpRef.SaveToFile('test.bmp');
DisplayDebugImgWindow(300, 300);
fastdrawclear(getdebugbitmap, clwhite);
DrawBitmapDebugImg(Bmp);
end.Perhaps someone wants to make it a bit more pretty or turn it into an extension? But please KISS. (Keep It Simple Silly)