Path: 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 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: !cs.cmu.edu!tgl BITNET: tgl%cs.cmu.edu@cmuccvma CompuServe: >internet:tgl@cs.cmu.edu