[Top][All Lists]

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

RE: [Groff] spline dotted ...

From: Ted Harding
Subject: RE: [Groff] spline dotted ...
Date: Sun, 03 Aug 2003 21:55:20 +0100 (BST)

On 02-Aug-03 Derek M Jones wrote:
> All,
> I have been trying to get pic to produce, without success,
> dotted or dashed splines.  The behavior is consistent between
> versions 1.18 and 1.19.
> pic does not complain about the usage:
> spline dotted from (1,1) to (2,3) ...
> or even if the 'dotted' appears at the end.
> But the generated curve is solid, not dotted (or dashed).
> Is this simply a bug in pic not warning about an unsupported
> usage, or is the usage currently broken?
> I would like it to produce a dotted curve.

As far as I know, "dashed" and "dotted" have never worked for splines
in PIC. However, you can force it (provided you are outputting to
PostScript) with an \X'ps: exec ... ' command. Example (to produce
a dashed spline):

command "\X'ps: exec [3 5] 0 setdash'"
spline from (0,0) to (1,0) to (2,1) to (2,2) to (1,3) to (0,2)
command "\X'ps: exec [] 0 setdash'"
circle rad 0.1 at (0,0)
circle rad 0.1 at (1,0)
circle rad 0.1 at (2,1)
circle rad 0.1 at (2,2)
circle rad 0.1 at (1,3)
circle rad 0.1 at (0,2)
line from (0,0) to (1,0) to (2,1) to (2,2) to (1,3) to (0,2)

There's no PS command for dotted lines as such, but you can emulate
it by changing the parameters to "setdash": e.g. try

  command "\X'ps: exec [0.25 1.5] 0 setdash'"

in place of the above. (The first number in [ ] gives the length of the
dash, the second the spacing between dashes, and the number following
gives the "offset" along the path at which it starts obeying the pattern).

For more general use, you'll need to read up about "setdash" in the
PostScript Reference Manual (a bit complicated to explain here).


E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 03-Aug-03                                       Time: 21:55:20
------------------------------ XFMail ------------------------------

reply via email to

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