groff
[Top][All Lists]
Advanced

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

Re: undiagnosed pic error


From: Oliver Corff
Subject: Re: undiagnosed pic error
Date: Sun, 4 Jun 2023 18:02:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

Hi Doug,

I understand that groff has the \D escape which allows you, among other
things, to draw outline and filled polygons.

A polygon:

 '\D'p DX1 DY1 DX2 DY2 ...''

From the texinfo groff manual:

           Draw a polygon from the current location to the relative
          position (DX1,DY1) and then to (DX2,DY2) and so on. When the
          specified data points are exhausted, a line is drawn back to
          the starting point.

A solid polygon:

 '\D'P DX1 DY1 DX2 DY2 ...'

Is this of any help for your purpose?

Best regards,

Oliver.


On 04/06/2023 17:19, Douglas McIlroy wrote:
Pic knows how to fill a box, a circle or an ellipse.
Groff(7) says you can fill "closed drawn objects".
So, on a whim, I tried to fill a triangle by drawing a closed line.

.PS
line from 0,0 to 0,1 to 1,1 to 0,0 fill 0.5
.PE

The line is drawn but not filled, and no diagnostic  is
issued for the inapplicable "fill".

A nice fix would be to make filled polygons work, perhaps
with a keyword "polygon", which behaves like "line", but
closes the figure automatically. Self-crossing polygons can
be handled as in PostScript.

A super-duper fix would support filling of closed curves made
of lines, splines and arcs.

In any event, it is wrong to silently ignore "fill".

Doug

--

Dr. Oliver Corff
Wittelsbacherstr. 5A
10707 Berlin
G E R M A N Y
Tel.: +49-30-85727260
Mail:oliver.corff@email.de


reply via email to

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