[comp.lang.postscript] Simple postscript language question

mahaun@sactoh0.sac.ca.us (Mark A. Haun) (03/13/91)

I have a question concerning the postscript language, and the
feasibility of implementing a simple postscript printer output
routine to a program I'm writing.

Some background:  I have recently built a homemade seismograph and
am presently coding the associated C software to record, display,
analyze, and print the seismograph traces.  I'd like to have an
option to print to a postscript printer, which would use only a
very limited subset of the postscript language.

The only graphics commands I require (apart from the initialization
and formatting commands) are point and line drawing commands, which
accept xy coordinates as arguments.  A "lineto" (line from last
position) command would be especially nice.  Does postscript have a
simple line command which could handle this?  Most importantly,
where can I find an accurate syntactic reference for the relevant
parts of the postscript language?

Since I know very little about postscript, any enlightenment would
be appreciated :-) !


-- 
Mark A. Haun / 3445 Del Mesa Ct. / Sacramento, CA 95821 / Phone: (916) 488-2965
UUCP: {ames | apple | sun}!pacbell!sactoh0!mahaun | Amateur Radio KJ6PC
INTERNET: mahaun@sactoh0.SAC.CA.US / pacbell!sactoh0!mahaun@ames.arc.nasa.gov
Amateur Pkt Radio: kj6pc@wa6nwe.#nocal.ca.usa -or- [44.2.0.56] on 144.93 MHz

marc@sequoia.cray.com (Marc Bouron) (03/13/91)

In article <1991Mar13.044414.4630@sactoh0.sac.ca.us>, mahaun@sactoh0.sac.ca.us (Mark A. Haun) writes:
|> I have a question concerning the postscript language, and the
|> feasibility of implementing a simple postscript printer output
|> routine to a program I'm writing.
|> 
|> Some background:  I have recently built a homemade seismograph and
|> am presently coding the associated C software to record, display,
|> analyze, and print the seismograph traces.  I'd like to have an
|> option to print to a postscript printer, which would use only a
|> very limited subset of the postscript language.
|> 
|> The only graphics commands I require (apart from the initialization
|> and formatting commands) are point and line drawing commands, which
|> accept xy coordinates as arguments.  A "lineto" (line from last
|> position) command would be especially nice.  Does postscript have a
|> simple line command which could handle this?  Most importantly,
|> where can I find an accurate syntactic reference for the relevant
|> parts of the postscript language?
|> 
|> Since I know very little about postscript, any enlightenment would
|> be appreciated :-) !

Try reading the "PostScript Language Reference Manual", by Adobe, and
published by Addison-Wesley (ISBN 0-201-10174-2).  It's quite an easy
book to read, and should tell you all you need to know.  You'll be
pleased to learn that there *is* a `lineto' command.  It's called
`lineto' :-)  (Though it's not necessarily quite as simple as that...)


[M][a][r][c]


################################################################################
#                           #  marc@sequoia.cray.com           #     .   .     #
#  Marc CR Bouron           #  M.Bouron@cray.co.uk     (ARPA)  #    _|\ /|_    #
#  Cray Research (UK) Ltd.  #  M.Bouron@crayuk.uucp  (DOMAIN)  #   (_|_V_|_)   #
#  +44 344 485971 x2208     #  M.Bouron@uk.co.cray    (JANET)  #     |   |     #
#                           #  ...!ukc!crayuk!M.Bouron (UUCP)  #               #
################################################################################

adrianho@barkley.watt.berkeley.edu (Adrian J Ho) (03/14/91)

In article <041335.7809@timbuk.cray.com> marc@sequoia.cray.com (Marc Bouron) writes:

>Try reading the "PostScript Language Reference Manual", by Adobe, and
>published by Addison-Wesley (ISBN 0-201-10174-2).

That's the First Edition.  The ISBN for the (greatly expanded and,
IMHO, more informative) Second Edition is ISBN 0-201-18127-4.

-----------------------------------------------------------------------------
Adrian Ho, EECS (pronounced "eeks!") Dept.		Phone: (415) 642-5563
UC Berkeley					adrianho@barkley.berkeley.edu
Domain: sesame-street (telly,bigbird,snuffy,oscar,kermit,bert,grover,barkley)
Favorite expression: "There's no business like monkey business."