Re: size and autoSize in TextControl

Sylvain-

Letourneau, Sylvain wrote:
I'm trying to extend the functionalities of VisAD with respect to text
rendering.  In particular, I want to be able to:
a) specify the angle at which each character of text is rotated with respect
to the baseline of the text string
b) specify an offset (x, y, z) to adjust the beginning of the string
c) specify a scaling factor to adjust the size of the characters

I'm also building a GUI interface to specify these arguments and select the
desired font.

I've 2 questions with respect to c) above. First, it appears to me that the
variable named "size" in TextControl is used to perform scaling but I'm not
sure.  I would appreciate if someone could confirm this.  Second, I would
like to know what is the meaning of the variable "autoSize" in TextControl
and its relation to "size", if any.

setSize() allows you to specify the initial size of the
text.

setAutoSize() will scale the sizes so as you zoom in and out,
the size will remain at the size specified by setSize().

See Test45 in the VisAD examples.  If you add a parameter
to the execution (i.e. "java Test45 x") it will display the
text on a sphere.

Someone else will have to answer how to do a & b above, but
for b I do it by rendering the shapes myself using PlotText
and setting an offset.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************



  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: