a2ps
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

graybar


From: David . A . Barr
Subject: graybar
Date: Thu, 3 Feb 2005 16:55:43 -0500




I'm trying to produce gray bars behind alternating sets of lines on my
printout.  I've been told this is called greenbar or graybar.  I used A2PS
to convert my text document to Postscript, then I inserted this Postscript
code in the document to do the bars:

/graybar { %def
  gsave
    .85 setgray
    0 1 ph th sub bfs div { % for each line on the page
      dup
      6 mod 3 div 1 ge { % draw a bar if it should be gray
        newpath
        x v get exch bfs mul neg y v get add th sub moveto
        pw 0 rlineto
        0 bfs neg rlineto
        pw neg 0 rlineto
        closepath fill
      } if
    } for
  grestore
} bind def

It works fine, and I'd like to get this added to the A2PS program as a
formatting option.  Can someone do this for me, or should I do it and mail
my patches to someone?

Thanks,

David





reply via email to

[Prev in Thread] Current Thread [Next in Thread]