🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #4286

What does concat do?

#4286
From: Steve Chanin
Date: Wed, 19 Dec 1990 16:56
49 lines
2561 bytes
Postscript Wizards,
	I've got some code which draws pictures composed only of lines
in a mac window under mac allegro common lisp.  I wanted to be able to
edit it in a graphics program, so I wrote a few functions to dump
postscript in the format used by idraw (a macpaint clone which runs
under x and uses postscript as its save format).  A line drawn with
idraw and saved as a .ps file looks like:
	Begin %I Line
	%I b 65535
	1 0 0 [] 0 SetB
	%I cfg Black
	0 0 0 SetCFg
	%I cbg White
	1 1 1 SetCBg
	%I p
	0 SetP
	%I t
	[ 1 0 0 1 97 183 ] concat
	%I
	44 441 260 325 Line
	End
Most of the commands are defined in the idraw prolog (at the end of
this message I've included a complete idraw file for a picture
containing two lines in case you need to see this prolog to understand
the preceeding postscript), but the key line seems to be:
	44 441 260 325 Line
As far as I can tell, if I map each line in my mac window into a
paragraph like the one above except with the 4 numbers before Line
changed, everything works fine (i.e. I get a postscript file which I
can view and print).  However, the question I have is what
does the concat command do?  What do the 6 numbers mean?  Different
lines in idraw seem to have a different matrix preceeding the concat
command, but I'm not sure what those matrices do or how to generate
the correct values for them.  In some sense, since it works, maybe I
shouldn't fix it, but I'd like to make the code available to other
people and before I do that, I'd like to make sure that it's "right."
I'd appreciate any help that anyone can give me.  Also, please make
your explanations simple because I don't know anything about
postscript (in fact before yesterday when I decided I needed to dump
postscript, I'd never even seen a postscript program).

Thanks alot,
Steve

--
===============================================================================
DOMAIN: sbchanin@ai.mit.edu                     MIT Artificial Intelligence Lab
USMAIL: Steven Chanin, 545 Technology Square Rm. 827, Cambridge Ma 02139
PHONE : (617) 253-8963
Technical Details
Message-ID: <SBCHANIN.90Dec19115648@cocoa-krispies.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!ai-lab!life!sbchanin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!ai-lab!life!sbchanin
From: sbchanin@ai.mit.edu (Steve Chanin)
Newsgroups: comp.lang.postscript
Subject: What does concat do?
Message-ID: <SBCHANIN.90Dec19115648@cocoa-krispies.ai.mit.edu>
Date: 19 Dec 90 16:56:48 GMT
Sender: news@ai.mit.edu
Reply-To: sbchanin@ai.mit.edu
Organization: MIT Artificial Intelligence Lab
Lines: 49