-
Notifications
You must be signed in to change notification settings - Fork 1
/
OFFSET.PS
executable file
·121 lines (120 loc) · 3.32 KB
/
OFFSET.PS
1
%!PS-Adobe-2.0%%Title: offset.ps%%Creator: Rhea Myers%%Title: Offset%%CreationDate: 21/2/95%%EndComments:%Prolog:/defaults save def%Basic variables and operations for redefining drawing commands /modify { %def dup 0 eq { pop 1 } if rand 42949672940 div .975 add mul cvi %multiplies integer by 90-110% } bind def /2modify { %def 2 { modify 1 2 roll } repeat %modifies top 2 numbers on stack } bind def /5modify { %def 5 { modify 1 5 roll } repeat %modifies top 5 numbers on stack } bind def /6modify { %def 6 { modify 1 6 roll } repeat %modifies top 6 numbers on stack } bind def %Rename drawing functions /*moveto /moveto load def /*lineto /lineto load def /*arcto /arcto load def /*curveto /curveto load def /*arc /arc load def /*rmoveto /rmoveto load def /*rlineto /rlineto load def /*rcurveto /rcurveto load def /*arcn /arcn load def /*arcto /arcto load def %Redefine drawing functions /moveto { %def 2modify *moveto } bind def /lineto { %def 2modify *lineto } bind def /arcto { %def 6modify *arcto }bind def /curveto { %def 6modify *curveto } bind def /arc { %def 5modify *curveto } bind def /rmoveto { %def 2modify *rmoveto } bind def /rlineto { %def 2modify *rlineto } bind def /rcurveto { %def 6modify *rcurveto } bind def /arcn { %def 5modify *arcn } bind def /arcto { %def 5modify *arcto } bind def %Rename text commands /*show /show load def %rename show %Redefine text commands /show { %def %redefine show for filled characters only { %forall /charcode exch def /thischar ( ) dup 0 charcode put def gsave currentpoint %save starting point /currenty exch def /currentx exch def thischar true charpath %get character outline /thispath [ { /moveto cvx } { /lineto cvx } { /curveto cvx } { /closepath cvx } pathforall ] cvx def newpath currentx currenty moveto thispath currentfont begin PaintType 2 eq { %ifelse stroke }{ %else fill } ifelse end grestore thischar stringwidth pop 0 *rmoveto currentpoint pop currenty *moveto } forall } bind def%%EndProlog:%fontgsave/Courier findfont 24 scalefont setfont0 0 moveto(postscript viruses that redefine drawing operators) show0 24 moveto(postscript viruses that redefine drawing operators) show0 48 moveto(postscript viruses that redefine drawing operators) showgrestore%%Trailer:showpagedefaults restore