I tried to paint a rotated bitmap with anti alias turned on, but it still has alias and it's not smooth, any help?
I did as following:
final Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
p.setAntiAlias(true);
canvas.rotate(-mValues[0]);
canvas.drawBitmap(compass, -compass.getWidth()/2,-compass.getHeight()/2,p);
In case you're rotating without a canvas (with
createBitmap
), set filter totrue
.Example:
Paint.setAntiAlias()
is for text.You want
p.setFilterBitmap(true)
;.