[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: Rotating an EPS file
From: |
Ted Harding |
Subject: |
Re: [Groff] Re: Rotating an EPS file |
Date: |
Fri, 14 Feb 2003 15:09:55 -0000 (GMT) |
On 14-Feb-03 Ralph Corderoy wrote:
>
> Hi Egil,
>
>> Talking of rotation: Has anyone seen a [di|g|t|n]roff or pic that can
>> do generic rotation? By generic I mean rotation of chararcters,
>> presumably also changing the text direction?
>
> The closest I know of is GNU groff's pic processing `line from 0, 0 to
> 1, 1 "abc" aligned' with grops as the back-end. It gets PostScript to
> do the rotation. I guess a similar thing could be done with GNU troff
> and grops, i.e. no need for pic.
Indeed, if you look at the PS code resulting from Ralph's example,
you will get a clue (or several ... ). That PS code is
.4 LW 324 84 252 156 DL 288 120 EBEGIN
gsave currentpoint 2 copy translate
-45.0000 rotate neg exch neg exch translate
EEND
/F0 10/address@hidden SF(abc)281.06 122.2 Q 252 84
EBEGIN
grestore
EEND
This inspires a simple example of on-the-fly rotation as the troff input
\Z'.'\X'ps: exec gsave -00.0000 rotate ( abc) show grestore'\
\Z'.'\X'ps: exec gsave -45.0000 rotate ( abc) show grestore'\
\Z'.'\X'ps: exec gsave -90.0000 rotate ( abc) show grestore'
which shows how the baseline lines up with the centre of rotation
and illustrates the fact that, after 'grestore', you are back where
you started from.
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 14-Feb-03 Time: 15:09:55
------------------------------ XFMail ------------------------------