Anti-Aliasing also for Image?

40 views
Skip to first unread message

Pai Peng

unread,
Jul 30, 2013, 3:27:59 AM7/30/13
to codenameone...@googlegroups.com
Hello CN1,

another question about Image with anti-aliasing.

I have created a custom button with Style() function. An image in circle form is set in Style as background. But I can see the aliasing effect of this image on simulator.

I noticed that the class Graphic hat a function "setAntiAliased()" which is very good for drawing lines. My question is, if there is any other function for anti-aliasing on image? Or any other method to avoid the aliasing effect of an Image?


Thank you.

Regards,

Pai

Shai Almog

unread,
Jul 30, 2013, 2:25:35 PM7/30/13
to codenameone...@googlegroups.com
Hi,
anti aliasing doesn't do anything for images. I'm assuming you scale the image (e.g. by using draw(int,int,int,int) which always degrades image quality regardless of the platform you will use.
Yes there are higher quality scale algorithms but they aren't realistic for real time rendering.
You should use images in their original size or use MultiImage.
Reply all
Reply to author
Forward
0 new messages