Hi,
Is there anyone out there who can help me with an algorithm for figuring out whether a line lies on the edge of any arbitary area? I've been trying to get this working for a couple of weeks and my mind is just too weak for this

I have an image which has a lot of lines in it that make up any type and shape of, err, shape. The lines are stored as a series of points in an array. I'd like the user of my tool to be able to select lines somehow.
My first idea was to all them to drag an area over the lines to select them. But there is possible problems of selecting too many or the wrong lines too easily.
My second idea was to create a full scale bitmap, draw all the lines and then flood fill the area and check the colour of pixels surrounding the points in the array. Problem: full scale image is 21600 * 10800

I would still like to use the second method, as these shapes will always be fully enclosed areas. But I can't figure out a good way to decide if a line is on the border of the area the user clicks in.
Any suggestions would kick ass

Cheers.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)