1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
% Test a tilted halftone screen.
/dot0
% The following screen algorithm is used by permission of the author.
{ 1 add 180 mul cos 1 0.08 add mul exch 2 add 180 mul cos
1 0.08 sub mul add 2 div % (C) 1989 Berthold K.P. Horn
} bind def
/dot1
{ dup mul exch dup mul add 1 exch sub
} bind def
/dot2
{ exch abs exch abs 2 copy le { exch } if
exch 1 sub dup mul exch dup mul add 1 exch sub
} bind def
72 72 scale
0 setlinewidth
/tiles {
0 1 7
{ /y exch def
0 1 7
{ /x exch def
x y moveto
1 0 rlineto 0 1 rlineto -1 0 rlineto closepath
gsave y 8 mul x add 63 div setgray fill grestore
0 setgray stroke
} for
} for
} bind def
gsave
2.3 -22 /dot0 load setscreen
currentscreen pop == pop
tiles showpage
grestore
gsave
2.3 22 /dot1 load setscreen
currentscreen pop == pop
tiles showpage
grestore
gsave
2.3 45 /dot1 load setscreen
currentscreen pop == pop
tiles showpage
grestore
gsave
2.3 45 /dot2 load setscreen
currentscreen pop == pop
tiles showpage
grestore
quit
|