David Kavanagh
Sat, 26 Jan 2002 20:20:17 -0800
[EMAIL PROTECTED]">David Kavanagh wrote:Here is the problem:
FontRenderContext.transform not being applied in TextLayout.draw()
You can just apply the appropriate translate and scale transforms
to the graphics context instead. That works in all versions
(including 1.2, where TextLayout also has transform problems).
AffineTransform trans = AfineTransform.getScaleInstance(0.5,0.5);
tl = new TextLayout("Hello - with scale", fontAttrs,
new FontRenderContext(null, true, true));
Graphics2D g2 = (Graphics2D) g;
g2.translate(25, 200);
g2.transform(trans);
tl.draw(g2, 0, 0);
---------------------------------------------------------------------
Kevin Weiner FM Software 610-997-3930 http://www.fmsware.com
===========================================================================
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".