groff
[Top][All Lists]
Advanced

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

Re: [Groff] Drawing filled circle segments


From: Ted Harding
Subject: Re: [Groff] Drawing filled circle segments
Date: Fri, 28 Oct 2005 16:38:20 +0100 (BST)

Another Oops! The end of the \X'ps: def' was missing its closing
quote in my first post (not that it seemed to spoil it!).
Here is the code again.


\X'ps: def \
/wedge { gsave \
  currentpoint translate 1 -1 scale \
  /ang2 exch def \
  /ang1 exch def \
  /B exch def /G exch def /R exch def \
  /rad exch def \
  R G B setrgbcolor \
  newpath \
  0 0 moveto \
  0 0   rad ang1 ang2 arc \
  closepath \
  fill stroke \
  grestore \
} def'
.ds wedge \Z'\X'ps: exec \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 wedge''
.LP
\&
.sp 1i
This is a line with_\h'0.5i'\
\*[wedge 36 1.0 0.0 0.0 000 045]\
\*[wedge 36 0.5 0.5 0.0 045 100]\
\*[wedge 36 0.0 1.0 0.0 100 170]\
\*[wedge 36 0.0 0.5 0.5 170 250]\
\*[wedge 36 0.0 0.0 1.0 250 360]\
\h'0.5i'_in the middle of it.
.sp 1i
That was a line with a bar-chart.


Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 28-Oct-05                                       Time: 16:38:14
------------------------------ XFMail ------------------------------




reply via email to

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