Render Fonts smoothly...
- From: "SPG" <steve.nospoo.goodsell@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 15:12:20 GMT
Hi,
I am trying to draw a string onto an image as smoothly as possible.
The problem is that I am streching the font a little to fit my area fully..
AffineTransform fontTransform = new AffineTransform();
fontTransform.scale( xScale , yScale);
Font f = myFont.deriveFont(fontTransform);
g.setFont(f);
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2d.drawString(x,y,"Hello");
This works a little but the antialiasing seems to be a bit heavy and the
rendered string looks a bit strange.
Is there another/better way to do this?
Steve
.
- Prev by Date: Re: Truncated Label Problem
- Next by Date: JTable Cells Alignment
- Previous by thread: Re: JButton inputStream to System.in
- Next by thread: JTable Cells Alignment
- Index(es):