Hi Deri,

On Fri Nov 21, 2025 at 7:37 PM CET, Deri wrote:
> On Thursday, 20 November 2025 17:43:11 GMT onf wrote:
> > [...]
> > I've recently discovered that groff's output drivers grodvi, grolj4, and
> > grolbp support an additional drawing command \D'R'. I notice from the
> > respective manpages that the reason for its addition seems to be lack of
> > support for other drawing commands by the respective devices.
> > 
> > With that said, I've been wondering why it's device-specific and not
> > also supported by grops and gropdf despite being easy to implement in
> > PostScript and PDF?
> [...]
> The attached patch fixes this, so gropdf behaves the same as its brother 
> devices, (with the bonus it now supports \D'R x y' and \D'r x y' - unfilled). 
> There is a difference because grodvi uses the current text colour \m[] 
> whereas 
> gropdf uses the current fill colour \M[] in line with the other graphic 
> primitives which have stroke and fill versions.

Nice!

However, \D'r' produces rectangles with round edges (like its \D'p'
counterpart). Is that what we want? \D'R' is described as drawing a
"rule", which I interpret as a filled rectangle with sharp edges. One
disadvantage of it being filled is that the lines have a thickness of
zero and thus one needs to know the default line thickness (0.04m) to
emulate a sharp-edged \D'l 1m 0'. \D'r' does not suffer from this issue
as its lines aren't zero width, meaning that \D'r 1m 0' is equivalent to
\D'l 1m 0'. But the fact that it has round edges also prevents it from
being useful for drawing rules since, as noted above, rules should have
sharp edges.

Cheers,
onf

Reply via email to