I have not worked with the TextLayout, so this may not be right. But
usually you don't want to change the transform of the Graphics2D, you
want to transform the object you are working with and draw it to the
Graphics2D. So I would try something like this.

private void drawLabels(Graphics2D my2d){
 AffineTransform transform = new AffineTransform();
 // alter the transform to do whatever scaling you need
 FontRenderContext frc = new FontRenderContext (transform, true, true);
 // create or get a font
 TextLayout label = new TextLayout("Hello World", font, frc);
 // calc the x and y position
 label.draw(my2d, x, y);
}

|*
<cid:[EMAIL PROTECTED]>*|

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