I tried to look into lib2geom but it does not seem to handle the different fill rules correctly.
How about adding the Clipper library ( https://sourceforge.net/projects/polyclipping/) to third_party? I attach an according patch. Using it I did not see clipping problems with my test cases (even though QPainterPath is still used for curves) Christoph Am Mi., 1. Apr. 2020 um 12:45 Uhr schrieb Jean Ghali <[email protected] >: > Le 31/03/2020 à 22:53, Christoph Bartoschek a écrit : > > Hi, > > > > as you have seen in https://bugs.scribus.net/view.php?id=16073 > QPainterPath::intersected() > > is buggy. Does Scribus already have or do you know a library that > correctly implements > > clipping? > > > > For PDF import it is necessary that the library can set non-zero winding > rule or even-odd > > rule to each path and then compute the correct output. > > > > I tried to look at some candidates: > > Cairo: Not sure but it looks to me as if the fill rule cannot be set > independently between > > the current clip path and the new one. > > lib2geom: Cannot find how to set the fill rule for a path. > > > > At the moment we do not have any specific library for computing clipping > intersection. > The lib2geom version we ship with our source code is also very old so you > should maybe > look at the latest code. Inkscape developers have continued improving > lib2geom and this > library has a repository on GitLab: > https://gitlab.com/inkscape/lib2geom > > Jean > > > _______________________________________________ > scribus-dev mailing list > [email protected] > http://lists.scribus.net/mailman/listinfo/scribus-dev >
add_clipper_library.diff.gz
Description: application/gzip
_______________________________________________ scribus-dev mailing list [email protected] http://lists.scribus.net/mailman/listinfo/scribus-dev
