Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site uw-beaver Path: utzoo!watmath!clyde!cbosgd!ucbvax!decvax!tektronix!uw-beaver!laser-lovers From: laser-lovers@uw-beaver Newsgroups: fa.laser-lovers Subject: PostScript example showing 1:1 pixel copying Message-ID: <1448@uw-beaver> Date: Fri, 26-Jul-85 19:29:22 EDT Article-I.D.: uw-beave.1448 Posted: Fri Jul 26 19:29:22 1985 Date-Received: Wed, 31-Jul-85 01:25:55 EDT Sender: daemon@uw-beaver Organization: U of Washington Computer Science Lines: 29 From: Brian Reid %! % PostScript program to demonstrate how to put down a raster image in the % device coordinate system, so as to guarantee that each bit of the raster % image maps exactly into one bit of the laser marking engine. It works % by cramming identity matrixes into all of the relevant transformations. /zstr 300 8 div 1 add cvi string def % define a 300-bit string buffer /Imtx matrix def % make an identity matrix 175 350 translate 0 0 moveto % go to a random place on the page /Courier findfont 15 scalefont setfont % put down a label (A 300-by-300 raster image: ) show currentpoint transform % see where we are in device coords Imtx setmatrix % turn off all transformation % (i.e. switch to device coordinate % system) translate % move origin to transformed currpt /imageproc { zstr } def % define a null imageproc % (it just puts 300 bits of zero on % the stack when it is called) 300 300 % print a 1-inch square false % make 0 bits be black Imtx % don't transform anything imageproc % our null imaging proc imagemask % generate the image showpage