[scribus-dev] Path Clipping Library

Christoph Bartoschek ponto at pontohonk.de
Sat Apr 11 12:23:11 UTC 2020


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 <jghali at libertysurf.fr
>:

> 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
> scribus-dev at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20200411/cc187345/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_clipper_library.diff.gz
Type: application/gzip
Size: 37067 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20200411/cc187345/attachment-0001.bin>


More information about the scribus-dev mailing list