🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #2798

Thin line woes

#2798
From: Tom Lane
Date: Wed, 15 Aug 1990 00:30
27 lines
1566 bytes
  I've been running into the old problem of thin lines (one or two pixels
wide) not being drawn with consistent widths.  The green book discusses
fixing this by rounding off line endpoint coordinates to integral values
in device space (example 9-4).  I haven't been very successful in making
this work, though.  A couple of questions:

  1. Line width variation occurs even with "0.12 setlinewidth".  On a
300dpi printer this width is exactly half a pixel.  I don't understand
how this could be translated into a two-pixel-wide line, no matter where
the endpoint positions fall.  If anyone can explain the exact algorithm
for deciding which pixels get blackened, I would be grateful.

  2. In the book "Real World PostScript" (Roth, ed.), Michael Fryd
recommends rounding endpoint coordinates to nearest-integer-plus-0.25
in device space, whereas the green book just shows rounding to nearest
integer.  Which of these is better, and why?

In case it matters, I'm working on an HP LaserJet III, PS interpreter
version 52.2.

-- 
				tom lane
Internet: tgl@cs.cmu.edu
UUCP: <your favorite internet/arpanet gateway>!cs.cmu.edu!tgl
BITNET: tgl%cs.cmu.edu@cmuccvma
CompuServe: >internet:tgl@cs.cmu.edu
Technical Details
Message-ID: <10244@pt.cs.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!zog.cs.cmu.edu!tgl

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!zog.cs.cmu.edu!tgl
From: tgl@zog.cs.cmu.edu (Tom Lane)
Newsgroups: comp.lang.postscript
Subject: Thin line woes
Message-ID: <10244@pt.cs.cmu.edu>
Date: 15 Aug 90 00:30:26 GMT
Organization: Carnegie-Mellon University, CS/RI
Lines: 27