Hi,
I had a program that I could draw into a graphics2D objects created by
BufferedImage object. The problem is that I could not drawString after I did
Graphics2D rotate. Could anybody help? The following is the piece of code that works
or does not work.
Graphics2D g2 = bi.createGraphics();
// The following codes works
Date date = new Date(System.currentTimeMillis());
g2.drawString("Date: " + date.toString(), 80, 80);;
g2.drawString("Subgroup", 20, 20);
// The following code does not work, I could not draw anything by different
// Rotated locations
AffineTransform at = new AffineTransform();
at.rotate(Math.PI/2);
g2.setTransform(at);
g2.drawString("Sample Mean", -140, -30);
g2.drawString("Sample Mean", -140, 30);
g2.drawString("Sample Mean", 140, 30);
g2.drawString("Sample Mean", 140, -30); // correct one
Thanks.
Jeff Wang
===========================================================================
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".