Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!samsung!munnari.oz.au!metro!usage.csd.unsw.oz.au!usage.csd!lambert From: lambert@spectrum.cs.unsw.oz.au (Tim Lambert) Newsgroups: comp.lang.postscript Subject: Re: printing thin lines on 300dpi printer Message-ID: Date: 5 Oct 90 00:09:21 GMT References: <1990Oct1.222116.14508@applga.aa.cad.slb.com> <1604@chinacat.Unicom.COM> Sender: news@usage.csd.unsw.oz.au Organization: EE & CS, Uni of NSW, Australia Lines: 33 In-reply-to: woody@chinacat.Unicom.COM's message of 4 Oct 90 00:32:29 GMT >>>>> On 4 Oct 90 00:32:29 GMT, woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) said: > In article , I wrote: >> >>>>> On 1 Oct 90 22:21:16 GMT, dsmith@applga.aa.cad.slb.com (J. Daniel Smith) said: >> > I'm trying to print 1 pixel wide lines on a 300dpi PS printer. >> Why not say "0 setlinewidth"? > Because as has been pointed out before, 0 setlinewidth is not guaranteed to > produce a 1 pixel wide line. setting it to .12 is supposed to explicitly > do that. Huh? The Red Book says that a line width of 0 produces a line one device pixel wide. If it doesn't then there is something wrong with the implementation of PostScript on your printer. I haven't tried it that much, but it has worked whenever I've tried it. You can draw a one pixel wide line easily and very quickly using Bresenham's algorithm so there aren't any excuses for an implementation that doesn't get it right. > A lot of times the problems with wide lines can be traced to > rounding problems. As I understand it, you can round up or down > to .25, 0 .5. Since any dot touched by a line gets filled in, in certain > roungings, you will have problems. This seems to occur when you have > rounded such that you are straddling the boundry between 2 ajacent > rows of pixels. Yes, I can see how this can happen. But if a line width of 0 gives you a line two pixels wide, I don't see how a line width of 0.12 could make it narrower. Tim