groff
[Top][All Lists]
Advanced

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

Re: [Groff] filling object with a pattern


From: Ted Harding
Subject: Re: [Groff] filling object with a pattern
Date: Wed, 30 Nov 2011 22:52:26 -0000 (GMT)

On 30-Nov-11 20:31:22, address@hidden wrote:
> I understand that I can fill pic objects with solid fill; 
> but is it possible to use a pattern fill instead?  
> This would be useful to draw e.g. a Venn diagram. 
> I am unable to figure out how to do it e.g. with slanted
> lines, except by calculating the line segments by hand.  
> I would prefer to draw them to the bounding box and have
> them cropped.

A good question! Using 'pic', it is very straightforward
to (for example) fill a box (or circle, etc.) with a
shade of grey:

  box wid 2 ht 1 with .sw at (1,0) fill 0.25

What is missing, which would allow your need to be filled
equally simply, is an attribute (say "hatched") which would
work similarly:

  box wid 2 ht 1 with .sw at (1,0) hatched 45 0.05

which would fill the blox with a hatching of slanted lines
at a 45-degree angle and with spacing 0.1 -- but that is
not available.

So, I think, the simple answer to your question is that,
as things stand with 'pic', you need to do it by hand.

However, I think it may be possible to really do it as
you want, but it would involve embedding some PostScript
code in the pic code.

I will try to work out how this can be done, but not just now!

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 30-Nov-11                                       Time: 22:52:23
------------------------------ XFMail ------------------------------



reply via email to

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