The answer to your first question is relatively simple:

Before you draw the string, you can do a transform() on the
Graphics2D. You pass in an AffineTransform that you create
with AffineTransform.getRotateInstance(theta).

Alternatively you can convert the string to a Shape and perform
a rotation on the Shape itself.

As for your second question, I don't think I can help you there.
This information will change depending on whether you're using
anti-aliasing or not. You may be able to convert your string
into a Shape and do some kind of operation to iterate over all of
the pixels in the shape... but I'm not sure.

Mike


> -----Original Message-----
> From: Discussion list for Java 2D API
> [mailto:[EMAIL PROTECTED] Behalf Of Sven Mielordt
> Sent: Tuesday, March 22, 2005 10:21 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA2D] drawString() on Graphics2D question
>
>
> 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 method to find out how many pixels in all
> directions will be occupied?
>
> Thank you,
> Sven
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
> ==============================================================
> =============
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> of the message "signoff JAVA2D-INTEREST".  For general help,
> send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

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

Reply via email to