The sweep line method looks fine though. I did find the Wikipedia page, but I did not see the link to this nice flash app. Thanks for pointing out.
Now I need to find a save way to resolve holes in the polygon shape. I guess the basic solution is to get rid of holes by adding two lines which share the same vertices in order to connect the hole to the outer shape. As long as there is only one hole, this is easy, but there can be an undefined number of holes in the shape.