Article View: comp.laser-printers
Article #535Re: Hairlines
From: Rich Berlin
Date: Tue, 16 Apr 1991 22:57
Date: Tue, 16 Apr 1991 22:57
46 lines
2275 bytes
2275 bytes
In article <9104151944.AA15613@crayola.cs.UMD.EDU>, ejbehr@RS6000.CMP.ILSTU.EDU (Eric Behr) writes:
|> Here is something that has bothered me for a long time. When I print some
|> PostScript code containing very thin lines (e.g. 0.001 setlinewidth), some
|> of them seem to be thicker than others. To see that it's best to print a
|> rather fine grid - e.g. every 1/8 inch or so. This shows up on two Apple
|> printers I've used - an old II NT and my Personal NT. Since engines are
|> different in the two, I have no clue as to what may be causing that.
|> Did other people notice that? If so, what's the reason? Eric
|> --
|> Eric Behr, Illinois State University, Mathematics Department
|> Internet: ejbehr@rs6000.cmp.ilstu.edu Bitnet: ebehr@ilstu
The thickness of the line is varying based on where your lines land in
device space. This is documented behavior in the redbook. In
PostScript Level 2 there's a feature that you can turn on to fix the
problem; in the meantime you're stuck having to adjust the line width
yourself. The method is documented, but the basic idea is that for
every coordinate pair you push on the stack, you adjust the
coordinates to land on a pixel boundary.
%!
% Adjust a coordinate pair to land on pixel boundaries
/adj { % x y => x' y'
transform
round exch round exch
itransform
} bind def
% Then try this test:
.001 setlinewidth
% Regular grid
0 72 8 div 72 {
/n exch def
0 n moveto 72 n lineto stroke
n 0 moveto n 72 lineto stroke
} for
% Adjusted grid
100 0 adj translate
0 72 8 div 72 {
/n exch def
0 n adj moveto 72 n adj lineto stroke
n 0 adj moveto n 72 adj lineto stroke
} for
Technical Details
Message-ID:
<9104171649.AA25773@crayola.cs.UMD.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!mips!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!SUN.COM!rberlin%birdlandEngReferences:
<9104151944.AA15613@crayola.cs.UMD.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!mips!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!SUN.COM!rberlin%birdlandEng From: rberlin%birdlandEng@SUN.COM (Rich Berlin) Newsgroups: comp.laser-printers Subject: Re: Hairlines Message-ID: <9104171649.AA25773@crayola.cs.UMD.EDU> Date: 16 Apr 91 22:57:42 GMT References: <9104151944.AA15613@crayola.cs.UMD.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Organization: Sun Microsystems Lines: 46 Approved: laser-lovers@brillig.umd.edu