Pure1993
2008-03-12 09:06:02
Well, it is interesting, I have come from asking about variables, coords, and colors, all the way to forms, TPoint arrays, and Array of TPointArray, and normal arrays, and here I got a question which includes every single one of those things in a more "advanced" sorta way:
With the "FindColorsSpiralTolerance", and I set up an array of colors earlier, and I want to save them all to one TPointArray, is it possible to search for all the colors at once? So, here is an example of How I would like to use it:
Urgh, after the edit the code is messed up, I'll edit it correctly once I get done with lunch, sorry
[LEFT]
I am aware that using the "for to do" statement would usually work, but in this case, I need to have all the coordinates of all the colors. And if I have that statement before the color finding and put an end after it, it would automatically overwrite the TPointArray, but If I use different TPAs, then I could combine them in order to split them… So, does anyone have a solution for this?
With the "FindColorsSpiralTolerance", and I set up an array of colors earlier, and I want to save them all to one TPointArray, is it possible to search for all the colors at once? So, here is an example of How I would like to use it:
Urgh, after the edit the code is messed up, I'll edit it correctly once I get done with lunch, sorry
[LEFT]
program abc;
var
Color : array [0..4] of Integer;
MyTPA : TPointArray;
i : Integer;
begin
Color[0] := 4876147;
Color[1] := 6126214;
Color[2] := 5073525;
Color[3] := 3951182;
Color[4] := 4875375;
x := MSCX;
y := MSCY;
if FindColorsSpiralTolerance(x,y,MyTPA,Color[i], MSX1,MSY1,MSX2,MSMY2,20) then
[/LEFT]I am aware that using the "for to do" statement would usually work, but in this case, I need to have all the coordinates of all the colors. And if I have that statement before the color finding and put an end after it, it would automatically overwrite the TPointArray, but If I use different TPAs, then I could combine them in order to split them… So, does anyone have a solution for this?