Hi

I am trying to create scores of Raster Labels for annotating
the nodes of a wireframe object (see earlier threads on this
by Corysia Taware and Daniel Selman). Is there a way to optimize
the creation of various objects involved in creating the raster ?
Can the objects such as BufferedImage, Graphics, and ImageComponent2D,
be reused to create subsequent labels after creating the
first one ?

Also, to determine the exact size of the BufferedImage for creating
a specific String label, one needs to get a FontMetrics object for
which one needs a Graphics object which again has to be obtained
from a BufferedImage object. Kinda Looks like a Catch22  situation !
Is there any other way to get a Graphics object ? Creating a
FontMetrics object directly is apparently not advisable according
to the API. Currently, I first create a dummy BufferedImage and
Graphics object to get a FontMetrics object, which I then repeatedly
use for creating subsequent labels. Seems to work quite well,
and I can determine rather nicely the exact sizes of various
strings. Would someone know of a better approach ?

While at it, let me also mention that the visual quality of the
Raster Text appears to be much better than a Text2D label !! Is
there any particular reason ? Can rendering and/or texture attributes
be fine tuned on a Text2D appearance object to make it look better ?

Please let me know if any of you have any comments.

Thanks in advance

Vaidya
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

===========================================================================
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