SRL Archive - OSR Help

Making a Box?


rya

2010-05-27 14:29:45

Edit: My question was answered thank, but i have a new one.

Function TPASearch:Boolean;
Var x,y,i :Integer;
TPA :TPointArray;

Begin
Setup;
Report('TPASearch','Sarting TPA search, Part 1 First colour search');

FindColorsSpiralTolerance(x,y,TPA,colour,MSX1,MSY1,MSX2,MSY2,Toll);
If Not (Length(TPA)>=3) Then
Begin
Report('TPASearch','Not found enouth colours in part 1 finding');
Exit;
End;

For I:= 0 To High(TPA) Do

Begin

End;

In the, For To Do loop i have the array of TPA, but how do i get the x,y points of that TP

marpis

2010-05-27 14:55:35

IntToBox(x1, y1, x2, y2: integer): TBox;

example:
myBox := IntToBox(x-10, y-10, x+10, y+10);

rya

2010-05-27 15:36:33

thanks marpis, i know how am going to do, what im trying to do now.
Thanks

masterBB

2010-05-27 19:05:52

[PHP]for i:=0 to High(TPA) do
begin
MiddleTPAEx(TPA, x, y);
end;[/PHP]

Like this?

Bad Boy JH

2010-05-27 21:21:56

In future, leave all qustions there, and just mark them as anwered, so people don't answer again. If you need to ask a question, then odds are somone else will need it too.

Boreas

2010-05-27 23:35:55

From: rya
Edit: My question was answered thank, but i have a new one.

Function TPASearch:Boolean;
Var x,y,i :Integer;
TPA :TPointArray;

Begin
Setup;
Report('TPASearch','Sarting TPA search, Part 1 First colour search');

FindColorsSpiralTolerance(x,y,TPA,colour,MSX1,MSY1,MSX2,MSY2,Toll);
If Not (Length(TPA)>=3) Then
Begin
Report('TPASearch','Not found enouth colours in part 1 finding');
Exit;
End;

For I:= 0 To High(TPA) Do

Begin

End;

In the, For To Do loop i have the array of TPA, but how do i get the x,y points of that TP


In the loop you don't have an array of TPA, you just have one, which is an array of TPoints.
TPA.x, TPA.y