[pstricks] thicklines with hatch
Christoph Bersch
usenet at bersch.net
Tue Oct 12 09:21:59 CEST 2010
Hi,
mathias legrand schrieb:
>>> I'd like to draw a pscurve with the doubleline option true such as I can
>>> fill the "thick line" with hatchures. The problem is that the doubleline
>>> option does not provide this possibility. The other possible way is to
>>> use Manuel's pst-thick but it sounds like it is limited to algebraic
>>> curves. Thanks for suggestions,
>>>
>> you can try to work with \psclip
>
> yes but I need a path of constant thickness which is perfectly handled
> by the doubleline option (and hard to achieve otherwise). I'll have a
> look at the definition of doubleline to see if I can do something for my
> needs.
I had a look at doubleline. Seems like it is done by drawing two lines
of different with above each other.
What one could do is something like
- draw the path using \pscustom
- approximate the current path with flattenpath to a sequence of
straight lines
- convert with upath to a procedure that contains all constructing
operations:
0 0 moveto
100 100 lineto
% flattenpath not needed
false upath
{0.0 -0.0 100.000427 100.000427 setbbox 0.0 -0.0 moveto 100.000427
100.000427 lineto}
After applying flattenpath, the userpath should contain only a setbbox
at the beginning, lineto or moveto operations, and possibly a closepath
at the end. Then e.g. by redefining lineto and moveto locally in
combination with Manuels psthick it might be possible to create thick
lines from arbitrary paths which can be filled. (Possibly there is an
easier way to extract the coordinates from the current path)
Christoph
More information about the PSTricks
mailing list