Hi everybody,
Increasing the memory did not help, so I created a Text2D with a relative
small point size (50) and scaled it with

Transform3D scalet3d = new Transform3D();
scalet3d.setScale(new Vector3d(100,100,100));

which is working fine.

My problem now is, I do have points which needs two labels, one
align_first (which I already achieved using the point coordinates) and one
align_last. My problem is how can I calculate the length of the given
string, so that I can adjust the x-coordinates?

Thanks Desiree


o------------------------------------------------------------------------o
| Desiree Hilbring      Institut fuer Photogrammetrie und Fernerkundung  |
|                       Universitaet Karlsruhe, Germany                  |
|                                                                        |
|                       email: [EMAIL PROTECTED]             |
|                       # 0721 6083676                                   |
o------------------------------------------------------------------------o

On Thu, 29 Mar 2001, Kelvin Chung wrote:

> Hi Desiree,
>
>    Text2D utility implement this by Texture2D. So if the texture
> size is bigger than that support by graphics card. The text
> may not show correctly or is truncated. It is up to the
> underlying driver to handle it. In this case when font
> size change from 560->660 it just went pass the maximum
> texture limit so font did not show correctly. When the
> font size is too large, Java3D need to allocate a bug
> chuck of memory for the texture so it is possible to
> run out of memory. You can use
>
> java -Xmx128m -Xms128m Test
>
> to increase the heap size of java.
>
> The method
>   text2D.setRectangleScaleFactor(2);
>   text2D.setString("new 2D Text");
>
> should work in v1.2.1 release.
>  However
>
>  text2D.setRectangleScaleFactor(2);
>
> will not change the scale factor if it set
> after scene graph live. (workaround is to
> call setString() after it). Bug 4431725
> is filed for this.
>
> Thanks for your bug report.
>
> - Kelvin
> -----------------
> Java 3D Team
> Sun Microsystems Inc.
>
>
> >X-Unix-From: [EMAIL PROTECTED]  Thu Mar 29 06:43:01 2001
> >X-Sender: [EMAIL PROTECTED]
> >MIME-Version: 1.0
> >Date: Thu, 29 Mar 2001 16:40:04 +0200
> >From: Desiree Hilbring <[EMAIL PROTECTED]>
> >Subject: [JAVA3D] Text2D problems
> >To: [EMAIL PROTECTED]
> >
> >Hi everybody,
> >
> >I am creating Text2D shapes with labels for some points. When I create
> >them near 0 with say a font size around up to 100 everything is okay.
> >In my real application my points are somewhere around x 3500000 and z
> >-5000000. That is why I want to go back and make the font size bigger, so
> >that I still can see my labels. But then I can only see the rectangular
> >area of the texture, which is no longer transparent.
> >You can verify this with the attached example program. Changing the font
> >size from 660 to 560 and the text will show.
> >I tested the
> >        //text2D.setRectangleScaleFactor(2);
> >        //text2D.setString("new 2D Text");
> >methods, but it did not understand the effects.
> >With enlarging the font size I additionally get often an out of memory
> >error.
> >
> >Thanks for your help in advance
> >
> >Desiree
> >
> >
> >o------------------------------------------------------------------------o
> >| Desiree Hilbring      Institut fuer Photogrammetrie und Fernerkundung  |
> >|                       Universitaet Karlsruhe, Germany                  |
> >|                                                                        |
> >|                       email: [EMAIL PROTECTED]             |
> >|                       # 0721 6083676                                   |
> >o------------------------------------------------------------------------o
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to