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!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!tektronix!uw-beaver!laser-lovers From: laser-lovers@uw-beaver Newsgroups: fa.laser-lovers Subject: 2nd PostScript pixel example--achieving 1:1 a different way Message-ID: <1475@uw-beaver> Date: Tue, 6-Aug-85 19:23:35 EDT Article-I.D.: uw-beave.1475 Posted: Tue Aug 6 19:23:35 1985 Date-Received: Mon, 12-Aug-85 02:49:39 EDT Sender: daemon@uw-beaver Organization: U of Washington Computer Science Lines: 29 From: Brian Reid[[Editor's note: I found this somewhat old note sitting in the incoming laser-lovers queue. Apparently I missed it when it came in. Sorry for the delay. --Rick ]] %! % Here is a second version of a PostScript program that maps imagemask % pixels exactly 1:1 onto the marking device. This version works by % adjusting the current transformation (eliminating its translation % component) rather than by using identity matrices. /zstr 300 8 div 1 add cvi string def % define a 300-bit string buffer /c matrix def % scratch matrix storage 2 dup scale 30 rotate % create pathological transformation 120 150 translate 0 0 moveto % go to a random place on the page /Courier findfont 7 scalefont setfont % put down a label (A 300-by-300 raster image: ) show currentpoint translate % move the origin /imageproc { zstr } def 300 300 % print a 1-inch square false % make 0 bits be black c currentmatrix % grab current transformation dup 4 [0 0] putinterval % remove translation part from it imageproc % our null imaging proc imagemask % generate the image showpage