🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #326

Re: Dotted line question

#326
From: Rich Berlin
Date: Fri, 24 Jul 1992 00:31
34 lines
1553 bytes
[Question: how to create a matrix of dots?]

You *should* be able to use a dashed line for this, since PostScript
gives you a lot of control over the dash pattern.  For example, the
following sets up the pattern you described (4 dots 5 mm apart--I've
assumed .1 mm wide--and then a 10 mm space) and starting at a point
1" up from the bottom of the page and 1" in from the left margin,
prints a grid:

72 25.4 div dup scale % user units are now millimeters
.1 setlinewidth
[.1 4.9 .1 4.9 .1 4.9 .1 9.9 ] 0 setdash
25.4 dup translate

0 -5 translate % we don't get a line at zero

0 5 250 {
    dup 25 mod 0 eq 
    {
	pop
    }{	
	0 exch moveto 200 0 rlineto stroke
    } ifelse
} for


This prints in no time flat on my SPARCprinter.

-- Rich
--
===============================================================================
Richard.Berlin@Eng.Sun.COM   |   The significant problems we face cannot be
			     |   solved at the same level of thinking we were
			     |   at when we created them.  -- Albert Einstein
Technical Details
Message-ID: <l6ujrkINNp9i@exodus.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!birdland.Eng.Sun.COM!rberlin
References: <1992Jul23.154738.15892@engr.latech.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!birdland.Eng.Sun.COM!rberlin
From: rberlin@birdland.Eng.Sun.COM (Rich Berlin)
Newsgroups: comp.lang.postscript
Subject: Re: Dotted line question
Message-ID: <l6ujrkINNp9i@exodus.Eng.Sun.COM>
Date: 24 Jul 92 00:31:48 GMT
References: <1992Jul23.154738.15892@engr.latech.edu>
Distribution: na
Organization: SunPics -- A Sun Microsystems Business
Lines: 34
NNTP-Posting-Host: birdland