Draw image with antialiasing?

I draw an image pixel by pixel via

g.drawLine(x, y, x, y);

but antialiasing via

g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);

g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);//smoothed zoom

doesn't work?

[366 byte] By [MartinHilperta] at [2007-11-26 15:40:32]
# 1
Neither of these is for anti–aliasing. For anti–aliasing tryRenderingHints.KEY_ANTIALIASINGRenderingHints.VALUE_ANTIALIAS_ON
crwooda at 2007-7-8 21:59:00 > top of Java-index,Security,Cryptography...
# 2
Sorry I copied the wrong lines. Of course I used RenderingHints.KEY_ANTIALIASINGRenderingHints.VALUE_ANTIALIAS_ON... but that doesn't help
MartinHilperta at 2007-7-8 21:59:00 > top of Java-index,Security,Cryptography...
# 3
you're drawing pixel by pixel and you expect anti-aliasing to work?
rkippena at 2007-7-8 21:59:00 > top of Java-index,Security,Cryptography...
# 4
Yes ... why shouldn't it work? I wrote a fractal program that calculates each pixel and after it's calculated, I draw it ... ?
MartinHilperta at 2007-7-8 21:59:00 > top of Java-index,Security,Cryptography...
# 5

Imagine instead of drawing pixels, you are drawing 10x10 squares. When the square is drawn, the edges are already flat. So there is nothing to antialias. antialiasing applies to lines and the edges of a shape. If you want the edges to appear more smooth, then you'll have to build that into your fractal algorithm when you determine the color. The other option might be to pass a blur over the image to soften it.

rkippena at 2007-7-8 21:59:00 > top of Java-index,Security,Cryptography...
# 6
And how can I "blur" it?
MartinHilperta at 2007-7-8 21:59:00 > top of Java-index,Security,Cryptography...
# 7
Search: The solution will involve using the ConvolveOp class. http://onesearch.sun.com/search/onesearch/index.jsp?qt=image+blur&subCat=siteforumid%3Ajava20&site=dev&dftab=siteforumid%3Ajava20&chooseCat=javaall&col=developer-forums
rkippena at 2007-7-8 21:59:00 > top of Java-index,Security,Cryptography...