Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!metro!cluster!jaa From: jaa@cs.su.oz (James Ashton) Newsgroups: comp.lang.postscript Subject: Re: Stroking thick lines about arcs Message-ID: <2120@cluster.cs.su.oz.au> Date: 25 Feb 91 05:07:55 GMT References: <1991Feb20.161757.24206@motcad.portal.com> <1991Feb21.225435.15664@cbnewsh.att.com> <1991Feb22.171314.5128@motcad.portal.com> Sender: news@cluster.cs.su.oz.au Reply-To: jaa@cluster.cs.su.oz (James Ashton) Organization: Basser Dept of Computer Science, University of Sydney, Australia Lines: 48 In article <1991Feb22.171314.5128@motcad.portal.com> jtc@motcad.portal.com (J.T. Conklin) writes: >In article <1991Feb21.225435.15664@cbnewsh.att.com> jlp@cbnewsh.att.com (jon.peticolas) writes: >>From article <1991Feb20.161757.24206@motcad.portal.com>, by jtc@motcad.portal.com (J.T. Conklin): >>> I have been observing that stroking an arc with a ``thick'' line results >>> in some areas of white peeking through the line --- especially about the >>> outside perimeter --- on two independant PostScript implementation. >> >>The closepath operator tells postscript that the ends of the path are >>to be joined with a mitered connection. If they are not actually the >>same point, the path will be completed with a straight line. This detail >>is covered in chapter 3 of the Adobe blue book (in my admittedly outdated >>copy anyway). Additional line joining details are covered in chapter 10. > >Thanks for the hints about closepath, as it solved a different problem with >the example that occurs with Ghostscript --- A little sliver of white is >not filled at the point where the two ends of the arc should joins. > >The original problem, was that little slivers of white were peeking >through spaced evenly about the perimeter of the circle. The vendor >of the interpreter in question has admitted the problem and I hope >they will be able to send me a fix soon. > You might like to try using setflat to fix this problem. Setflat controls how many straight line segments are used to approximate the bezier curves used in PostScript. In the case of the arc operator, bezier curves are generated to approximate real circles since PostScript doesn't have real circles. The argument to setflat controls the maximum error between the bezier and it's approximating line segment as measured in device pixels. Se if a currentflat 5 div setflat fixes your problem. Even the adobe interpreters can be pushed too far and exhibit similar problems. Try the code below for an example of this. currentflat 5 mul setflat 144 setlinewidth 300 300 18 0 180 arc stroke showpage Of course decreasing the currentflat has performance implications so be sure to put it back the way you found it after you've finished with the critical part or your printer will take a performance hit. James Ashton.