Android Canvas.DrawBitmap without blurring/AntiAliasing?

Posted by Sh33p on Stack Overflow See other posts from Stack Overflow or by Sh33p
Published on 2010-12-31T20:16:58Z Indexed on 2010/12/31 20:54 UTC
Read the original article Hit count: 246

Filed under:
|

I'm trying to make an android game using sprites, (or very pixelated characters, backgrounds etc.). I draw them on the canvas like so...

matrix.preScale(xrat,yrat);

canvas.drawBitmap(img, matrix, null);

Where img is the Bitmap and the xrat and yrat are the scales.

My problem is that when I test, the Bitmap is blurry or anti-aliased, is there a way to prevent this? The rigid-blocky art style of the game will be ruined if the blocks are blurry.

Any (ANY) help appreciated!

© Stack Overflow or respective owner

Related posts about java

Related posts about android