is there a way to convert a tbox to integers ie. x1, x2, y1, y2.
I know that a box contains 2 points right? if so maybe there's a way to do point to integers as well ie. ex, es, yx, ys .
is there a way to convert a tbox to integers ie. x1, x2, y1, y2.
I know that a box contains 2 points right? if so maybe there's a way to do point to integers as well ie. ex, es, yx, ys .
Box.X1, Box.Y1, Box.X2, Box.Y2
Simba Code:procedure Example;
var
B, b2: TBox;
begin
B := (IntToBox(100, 200, 300, 400));
WriteLn(ToStr(B));
WriteLn('B.X1 = ' + ToStr(B.X1));
WriteLn('B.Y1 = ' + ToStr(B.Y1));
WriteLn('B.X2 = ' + ToStr(B.X2));
WriteLn('B.Y2 = ' + ToStr(B.Y2));
b2 := (PointToBox(Point(000, 000), Point(111, 111)));
WriteLn(ToStr(b2));
WriteLn('b2.X1 = ' + ToStr(b2.X1));
WriteLn('b2.Y1 = ' + ToStr(b2.Y1));
WriteLn('b2.X2 = ' + ToStr(b2.X2));
WriteLn('b2.Y2 = ' + ToStr(b2.Y2));
end;
Is that what you are looking for? Excuse my lazy standards, please.
INACTIVE
How-to: Make S.M.A.R.T. less laggy
Sell me your Maple Shieldbows (u)! Up to 95gp ea!
My Scripts:
Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
99 x78 |
99 x10 |
99 x2 |
99 x12
Use the REPORT tags when posting progress reports to make life easier (:
[REPORT]Put progress report in here![/REPORT]
Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]
well there are many useful functions like intTobox, or pointToBox. but what about the other way around?
You just want the points of the box itself? Just use Box.X1, etc. Or what exactly are you trying to do?
im doing a whole lot but yes basically im searching a color and i did not have a way to make my box fit within the parameters ie. wrong variable type...
so b.x1 you say?
edit.
i would need the box ie. box1:Tbox to fit within findcolor(1111,box1.x1,box1.x2,box1.y1,box1.y2) i would not know if box.x1 changes a Tbox to an integer.
Last edited by m3gaman3g3nd; 01-13-2012 at 04:04 AM.
Simba Code:procedure Exampe;
var
X, Y: Integer;
B: TBox;
begin
B := (IntToBox(100, 200, 300, 400));
if (FindColor(X, Y, COLOR, B.X1, B.Y1, B.X2, B.Y2)) then
WriteLn('Success.');
end;
How about like that? A TBox just holds 4 values to make a box. You can 'Grab' each of the values at any time you desire as long as you have the values declared. Like in the example script I have given you, you first declare the box's values and then you use the box's values in a FindColor() method. It's just 'Borrowing' the values from the TBox, really.
I appreciate your assistance and that is a prestige sample that clarifies everything, hail Hydra. Rep ++
edit.
ahhh but i see it must be x1 y1 x2 y2 or you get an error
Last edited by m3gaman3g3nd; 01-13-2012 at 04:30 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)