|
![](/i/fill.gif) |
Wasn't it Zero who wrote:
>I'm not really a new user, but this question is so basic (and I'm such an
>amateur) that this seemed like the right group to ask. Ok, here's the deal:
>I'm trying to align text around a circle. I have been trying by making the
>individual letters, then translating them down, and subsequently rotating
>them into place. However this gives 2 problems: 1. the origin is in the
>lower left of each letter, so after rotating they still don't align nicely
>and instead slope to the right a bit, and 2. since I don't know the width of
>each character I can't space them correctly.
>Now I know in the Win32 GUI there is a function which tells you the width of
>a character, but I'm guessing this isn't implemented in povray. So my
>question is: is there any way to calculate the width of each character? Or,
>alternatively, does anyone know how to reach the same effect in a different
>way (perhaps with a macro)?
I don't know any easy way to do it in official PovRAY, but there are
ways to do it in MegaPOV.
One MegaPOV patch adds the max_extent keyword. To use this you have to
#define the letter as an object, then max_extent(that_letter) is a
vector which shows the maximum x, y and z values that the letter
reaches. As the lower left of the letter is at the origin, the x
component of the max_extent is the width.
The easy way to solve the first of your problems (but not the second) is
to use another keyword added by a MegaPOV patch. "align_center" is a
modifier than can be applied to a text object. When you apply it to a
single letter text object then the origin is at the centre of the bottom
of the letter.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |