Re: [JAVA2D] drawString() on Graphics2D question

2005-03-22 Thread David Gilbert
Sven Mielordt wrote: Hi fellows, I have a short question concerning drawString() on Graphics2D. When using it, the string is printed horizontally. But how can I print text vertically or at arbitrary angles??? A refining question concerns the number of pixels needed for the string. Is there any

Re: [JAVA2D] drawString() on Graphics2D question

2005-03-22 Thread Chet Haase
Another alternative (preferable to creating a Shape, I think) is to render the string into an Image, and then rotate the image. Or better yet: render the rorate string into the image, and then just copy the image (no transform involved). This approach is not worth the hassle if you are constantly

Re: [JAVA2D] drawString() on Graphics2D question

2005-03-22 Thread Phil Race
Time for a few quick comments Alternatively you can convert the string to a Shape and perform you will get worse looking text this way. It will also be much slower. Another alternative (preferable to creating a Shape, I think) is to render the string into an Image, and then rotate the image. As

Re: [JAVA2D] drawString() on Graphics2D question

2005-03-22 Thread Chet Haase
Clarification: Another alternative (preferable to creating a Shape, I think) is to render the string into an Image, and then rotate the image. As well as the string itself an image will carry the background with it so this is probably not the best way to go for most people. You can create an