[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Rotating element of a PIC fogure
From: |
Ted Harding |
Subject: |
[Groff] Rotating element of a PIC fogure |
Date: |
Sun, 03 Jan 2010 09:08:45 -0000 (GMT) |
Greeting again!
Following up on the "greetings card" exercise, the following
is an example of how part of a picture, defined by pic code,
can be rotated within the context of the whole. The "part"
in this example is simply an ellipse, but it could be defined
by a sequence of pic commands so long as it is enclosed within
the "\*[rotate ... ]" and "\*[restore]" pair.
The ".blm" prevents the "shaded ... " from potentially
introducing a vertical displacement (if you have previously
given .blm a special definition).
Note that aligned text works correctly within a rotated context,
relative to the rotated part.
.blm
.ds rotate "\X'ps: exec gsave currentpoint 2 copy translate \
\\$1 rotate neg exch neg exch translate'"
.ds restore "\X'ps: exec grestore'"
.PS
ellipse wid 2i ht 0.5i at (0,0) shaded "red" \
"RED RED RED RED RED"
"\*[rotate 45]" at (0,0)
ellipse wid 2i ht 0.5i at (0,0) shaded "green" \
"GREEN GREEN GREEN"
"\*[restore]"
"\*[rotate 90]" at (0,0)
ellipse wid 2i ht 0.5i at (0,0) shaded "blue"
line invis from (-1,1) to (1,-1) "BLUE BLUE BLUE BLUE" aligned
## "BLUE" text rotated 45 degrees relative to the blue ellipse
"\*[restore]"
.PE
Best wishes, and Happy New Year, to all.
Ted.
PS I don't think there are any trailing spaces above! I have
successfully pasted the above back into a file with correct results.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 03-Jan-10 Time: 09:07:17
------------------------------ XFMail ------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] Rotating element of a PIC fogure,
Ted Harding <=