Write Text [message #8378] |
Fri, 28 February 1997 00:00 |
Stefan Schor
Messages: 5 Registered: August 1996
|
Junior Member |
|
|
Hallo,
is there someone who can tell me, how I can write a Text inside a
circle ? (align to the border - so the text is distorted)
(like Audio-CDs)
Ciao... (thanks)
|
|
|
Re: Write Text [message #8380 is a reply to message #8378] |
Fri, 28 February 1997 00:00  |
Tim Patterson
Messages: 65 Registered: October 1995
|
Member |
|
|
Stefan Schor wrote:
>
> Hallo,
>
> is there someone who can tell me, how I can write a Text inside a
> circle ? (align to the border - so the text is distorted)
> (like Audio-CDs)
>
> Ciao... (thanks)
Hmmm.. right off the top of my head, I can think of two
hacks that might work. Really depends on exactly how you
are going to use them.
(1) Split the phrase into separate letters and use
the XYOUTS procedure to write each letter at a particular
point around a circle. This doesn't distort the text though!
(2) Using the z buffer, write your text out to a plot,
use TVRD to get that part of the plot, and then warp it
using the POLYWARP function and paste it to your main plot
with TV.
I guess your text will be different each time you do this
warp. If not, I'd just make up a gif using a painting
package that performs this sort of function, and just read that
in and TV it to where you need it.
Unless somebody has a better solution... :)
Tim
|
|
|
Re: Write Text [message #8383 is a reply to message #8378] |
Fri, 28 February 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Stefan Schor <spion@dose.test.de> writes:
> is there someone who can tell me, how I can write a Text inside a
> circle ? (align to the border - so the text is distorted)
> (like Audio-CDs)
I don't have *any* time for this today... :-)
But it will look *something* like this:
*******************************
FUNCTION CIRCLE, xcenter, ycenter, radius
points = (2 * !PI / 119.0) * FINDGEN(120)
x = xcenter + radius * COS(points )
y = ycenter + radius * SIN(points )
retValue = TRANSPOSE([[x],[y]])
RETURN, retValue
END
points = Circle(100, 100, 50)
FOR j=0, 119, 10 DO $
XYOutS, points(0,j), points(1,j), String(j/10), $
/Device, Alignment=1.0, Orientation=30*j/10
END
****************************************
Cheers!
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
|
|
|