Bug 677275 - Mosaic Filter produces ugly artifacts

Fix this by using a real point-segment distance.
Some artifacts remains though, they must come from somewhere else.