groff
[Top][All Lists]
Advanced

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

Re: [Groff] colored background?


From: Michael(tm) Smith
Subject: Re: [Groff] colored background?
Date: Fri, 22 Feb 2008 21:54:27 +0900
User-agent: Mutt/1.5.14r5351+poontang (2008-01-29 21:06:38+09:00)

Ted Harding <address@hidden>, 2008-02-22 11:33 -0000:

> As B1/B2 are written, they simply draw the box as a series of
> lines, using \D'l .... '. This does not create a "closed object"
> which can be filled.
> 
> However, if you use \D'P ... ' you will draw a polygon which
> will be filled (\D'p ... ' draws a polygon which will not be
> filled).

OK, the existing B2 macro definition has this:

  \v'-1v+.25m'\
  \D'l (u;\\n[.l]-\\n[.i]) 0'\
  \D'l 0 |\\n[par*box-top]u'\
  \D'l -(u;\\n[.l]-\\n[.i]) 0'\
  \D'l 0 -|\\n[par*box-top]u'

...so I chage that to this:

  \v'-1v+.25m'\
  \D'P (u;\\n[.l]-\\n[.i]) 0 \
    0 |\\n[par*box-top]u \
    -(u;\\n[.l]-\\n[.i]) 0 \
    0 -|\\n[par*box-top]u'

Does that look correct?

> In order to get the effect (I think) you want, you will also
> need to
> a) Before drawing the ploygon, set the colour to white so that
>    the border is invisible;
> b) Set the "grey-level" of the fill using \Z'\D'f N'' where N
>    is between 0 (white) and 1000 (black) [The \Z'...' is there
>    to enforce zero motion -- otherwise \D'f N' causes a motion
>    of amount Nu).
> c) Then draw the polygon using \D'P ... '; the result will be
>    a grey-filled polygon with no visible border.
> d) Re-set the colour and the grey-level for filling before
>    continuing.

OK, that all sounds pretty straightforward. But I can't seem to
actually test it because I'm not getting boxed text in PS output
even with the unmodified B1/B2 macros -- though I do get it as
expected in TTY output.

All that I did was to copy the B1 and B2 macros (unmodified) over
to a test man source file, along with the address@hidden macro (which
they seem to depend on). If I do that and then wrap some text in
the test file in B1/B2, I get the text boxed in TTY output as
expected, but not in PS output I generate with "man -l -Tps".

So before I can figure out if the modified B2 for polygon drawing
is working, I think I need to figure out why the unmodified B1/B2
for box-drawing isn't working in my PS output...

  --Mike

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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