groff
[Top][All Lists]
Advanced

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

Re: geometric primitives (was: interviews with groff developers)


From: Douglas McIlroy
Subject: Re: geometric primitives (was: interviews with groff developers)
Date: Tue, 8 Aug 2023 10:04:07 -0400

>From the user's perspective, I think simplest would be if "line" took a
"fill" attribute subject to the constraint that the line ends where it
begins, something pic can enforce.  In that case, it would draw a solid
polygon instead of a sequence of lines.

I once looked into the code to see if that would work. Unfortunately,
in pic each segment (identified by "to") is independent, The most
obvious fix  would be to introduce a new kind of object, "polygon",
with line-like syntax, but a new (variable-length) data structure, and
an alternate way to record "to" phrases. In short, it was not as easy
as I had imagined, and I was too lazy to follow up on the idea.

Folks may be amused by how I actually fill polygons in pic. I break
them up into boxes and right triangles. Each triangle is described as
a filled box that spans the triangle's three corners. Then the
PostScript is edited to delete the extra corner.

Doug



reply via email to

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