smart draw line (pathfinding)

How to do this ...

I have to make a method that will draw a polyline from point to point, but the line needs to find a shortest path from point A to point B avoiding objects (like ovals, rects ...) that are between them. I know that this can be done using some algorithm like A-star, but in all examples i found on the net, there is a matrix of fields or something like that ... and i just have a matrix of pixels :) And, one more thing, every "subline" of this polyline needs to be horizontal or vertical (no diagonal lines).

Any help is greatly appreciated.

Joshefin

[593 byte] By [Joshefina] at [2007-11-27 7:52:59]
# 1
Anyone ? Anything ?
Joshefina at 2007-7-12 19:34:14 > top of Java-index,Java Essentials,Java Programming...
# 2
> Anyone ? Anything ?Look up Floyd's algorithm. To find shortest routes it uses a graph definition as an adjacency matrix which is what your grid is.
sabre150a at 2007-7-12 19:34:14 > top of Java-index,Java Essentials,Java Programming...