- ArtSVP* svp2 = art_svp_rewind_uncrossed(art_svp_uncross(svp),ART_WIND_RULE_ODDEVEN);
- art_svp_free(svp);svp=svp2;
+
+ /* for some reason, we need to rewind / self-intersect the polygons that gfxfillToSVP
+ returns- art probably uses a different fill mode (circular?) for vpaths */
+ ArtSVP*svp_uncrossed=0;
+#ifdef ART_USE_NEW_INTERSECTOR
+ ArtSvpWriter * swr = art_svp_writer_rewind_new(ART_WIND_RULE_ODDEVEN);
+ art_svp_intersector(svp, swr);
+ svp_uncrossed = art_svp_writer_rewind_reap(swr);
+#else
+ svp_uncrossed = art_svp_rewind_uncrossed(art_svp_uncross(svp),ART_WIND_RULE_ODDEVEN);
+#endif
+ art_svp_free(svp);
+ svp=svp_uncrossed;
+