[fa.laser-lovers] 2nd PostScript pixel example--achieving 1:1 a different way

laser-lovers@uw-beaver (08/07/85)

From: Brian Reid <reid@Glacier>

[[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