Re: [JAVA2D] Is It possible to do Image Conversion without distortion...

2004-09-21 Thread Chris Campbell
Hi Palani, I assume you are referring to the artifacts introduced from the scaling process. This will always be the case when you scale an image to be larger than the original, since you cannot preserve the same quality/resolution. I think what you are looking for is some sort of smoothin

Re: [JAVA2D] Why does TextLayout operate different from the rest of Java2D?

2004-09-21 Thread Jim Graham
I'll wait for one of the text gurus to respond about the reason that TextLayout needed to control its own rendering, but at least one part of your example can be simplified: g2d.translate( textX, textY ); textA.draw( g2d, 0, 0 ); g2d.translate( -textX, - textY ); Could be written as simply:

Re: [JAVA2D] Is It possible to do Image Conversion without distortion...

2004-09-21 Thread Chris Campbell
Hi Palani, Could you explain what you mean by "distorted"? I ran your testcase and it seems to work as expected. BTW, your code that calculates the scale factors and whatnot could be greatly simiplified. Since you're just doing simple scaling, there's no need to use AffineTransform. Instead, you