SRL Archive - OSR Help

Point within an area?


Flight

2011-02-27 07:56:08

Any simple procedures to search for a set point within an specified area? Maybe something like:
PointInArea(Point:TPoint; xs,ys,xe,ye:integer): boolean;
Or something along those lines?

Narcle

2011-02-27 08:07:29

PointInBox( TPoint, TBox): boolean;

and you can do it like this PointInBox( Point(x, y), IntToBox(xs,ys,xe,ye)): boolean;

Flight

2011-02-27 08:17:12

That's what I was looking for, thank you Narcle! I had found PointInBox, but I had no idea how to specify the box, which is where 'IntToBox' comes in, what a great function that is. :p