From: André W. <wo...@us...> - 2008-11-20 03:12:17
|
Hi, thanks for all your initial work. Indeed, we just have to change the operators in the various branches in the decorated path. changeset 3003 implements style.fillrule. Its likely that this patch can be applied to PyX 0.10 without any conflicts. Best, André Am 19.11.2008 um 21:43 schrieb Ken Starks: > André Bouchet wrote: >> Thank you for the answer, which learned me a lot. I have checked the >> hack for PDF files. It works. There is surely a similar hack for EPS >> files. >> >> If somebody is interested I have written another script in PyX to >> experiment with the 'nonzero winding number'. >> >> André > It seems to work if you alter line 188 of deco.py --- changing fill > to eofill, the > Postscript operator you mentioned in your first post. > > # ******************************************* > else: > # only fill fillpath - for the moment > if self.fillstyles: > file.write("gsave\n") > _writestyles(self.fillstyles, context(), > registry, bbox) > > file.write("eofill\n") # "fill" changed to "eofill" > for > an EVEN-ODD fill > bbox += fillpath.bbox() > > if self.fillstyles: > file.write("grestore\n") > > > # ********************************************* > > However, these hacks are not the whole story, as there is another > branch > in the code > > if self.strokestyles is not None and strokepath is fillpath: > .... > > which I have not altered in either the PDF or Postscript case. > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user > -- by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ |