|
First Version | Second Version | Third Version | Fourth Version |
---|---|---|---|
%!PS-Adobe-2.0 newpath % black 252 324 moveto 0 72 rlineto 72 0 rlineto 0 -72 rlineto closepath fill newpath % dark 270 360 moveto 0 72 rlineto 72 0 rlineto 0 -72 rlineto closepath .4 setgray fill newpath % light 288 396 moveto 0 72 rlineto 72 0 rlineto 0 -72 rlineto closepath .8 setgray fill showpage % print |
%!PS-Adobe-2.0 % Define box proc /box { 72 0 rlineto 0 72 rlineto -72 0 rlineto closepath } def % Begin Program newpath % black 252 324 moveto box 0 setgray fill newpath % dark 270 360 moveto box .4 setgray fill newpath % light 288 396 moveto box .8 setgray fill showpage |
%!PS-Adobe-2.0 % Define procedures /inch {72 mul} def /box % stack: x y => --- { newpath moveto 1 inch 0 rlineto 0 1 inch rlineto -1 inch 0 rlineto closepath } def /fillbox % stack: gray => --- { setgray fill } def % Main Program 3.5 inch 4.5 inch box 0 fillbox 3.75 inch 5 inch box .4 fillbox 4 inch 5.5 inch box .8 fillbox showpage |
%!PS-Adobe-2.0 % Define procedures /inch {72 mul} def /box % stack: x y => --- { /y exch def % save /x exch def % save newpath x y moveto 1 inch 0 rlineto 0 1 inch rlineto -1 inch 0 rlineto closepath } def /fillbox % stack: gray => --- { setgray fill } def % Main Program 3.5 inch 4.5 inch box 0 fillbox 3.75 inch 5 inch box .4 fillbox 4 inch 5.5 inch box .8 fillbox showpage |
Result: box1.pdf | Result: box2.pdf | Result: box3.pdf | Result: box4.pdf |