AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Text3D Dimensions

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java
View previous topic :: View next topic  
Author Message
Chris Hodgins
Guest





PostPosted: Sun Feb 20, 2005 3:14 pm    Post subject: Text3D Dimensions Reply with quote



Hi,

Is it possible to get an accurate width and height of Text3D objects?
I have already tried using:

String myStr = "hello world!!!";
Font font = new Font("Arial", Font.PLAIN, 2);
FontRenderContext rc =
simpleU.getCanvas().getGraphics2D().getFontRenderContext();
LineMetrics lm = font.getLineMetrics(myStr, rc);
double fontWidth = font.getStringBounds(myStr, rc).getWidth();
double fontHeight = font.getStringBounds(myStr, rc).getHeight();

I check the results by drawing a line box around the Text3D object
using the height and width obtained above and the results are not bad
but not good enough.

Chris
Back to top
Martin Hedler
Guest





PostPosted: Tue Mar 15, 2005 8:03 pm    Post subject: Re: Text3D Dimensions Reply with quote



Quote:
Hi,

Is it possible to get an accurate width and height of Text3D objects?
I have already tried using:

I think Text3D has a getBounds methode.

Martin

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> 3D Graphics API's for Java All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.