[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vertical rules
From: |
Jeff Kingston |
Subject: |
Re: Vertical rules |
Date: |
Sat, 26 Apr 2003 07:54:22 +1100 |
Giovanni Zezza wrote:
I don't know how to draw vertical rules between the cells...
I know I may switch to @Graphic ... or @Diag ... or use @Box,
but I can't help to think that there must be a simpler way
I think it's quite reasonable to go back to Lout primitives when
generating documents from data using software. The primitives
give a simple, well-defined semantics with no unwanted bells
and whistles, and typically run faster too.
Lout relies on PostScript, reached via @Graphic, for all its
curve drawing, so @Graphic seems to be to be the approach
most consistent with the rest of what you are doing. Have
a look at @LocalWidthRule, defined in file include/bsf. It's
a bit complicated by the optional linewidth parameter and
attempting to handle PDF and plain text as well as PostScript,
but when boiled down all you really need is this:
def @VRule
{
"0 0 moveto 0 ysize lineto stroke" @Graphic {}
}
When placed alongsize a cell using | or ||, Lout will
assign an amount of vertical space to @VRule equal to
the height of the cell, then the PostScript between
quotes will draw a line from the bottom left hand
corner of this region (0 0 moveto) to the top left
hand corner (0 ysize lineto) and stroke it.
It does seem odd that nothing like this has ever been
packaged up in the standard packages. I guess there
is just no demand for vertical rules in most documents.
Jeff Kingston
- Vertical rules, Giovanni Zezza, 2003/04/25
- Re: Vertical rules,
Jeff Kingston <=