Hi,
the current implementation of polygon clipping, like it is used for e.g. for ellipse, circle and polygon objects, does not work properly.
I added a patch, which implements the Sutherland-Hodgman algorithm for generic polygon clipping against a rectangular bounding box (following the pseudo code from http://www.cs.rit.edu/~icss571/clipTrans/PolyClipBack.html).
The gnuplot script shows some test cases, which do not work with the current implementation (compare -old files with -new files).
The patch also add a routine for drawing a clipped polygon path with a minimum amount of move() calls. This allows the terminal drivers to use proper line joins, as the arrow in the gnuplot script show.
I guess, the generic polygon clipping may also be useful for plot style filledcurves.
Christoph
Nice. I have been working on a solution for circles - but your solution is far more general!
Looks very good. Shall I add it to CVS or are you still working on it?
No, I am not working on it, you can add it.
Thank you
Added to CVS for 4.7
thanks for the nice improvement.