I have a simple bitmap that I draw within a canvas & that I rotate using a matrix.
The problem I bump into is that using hardware acceleration the edges are not anti-aliased when rotated (this is working perfectly with Hardware acceleration turning off). And of course things like “setDrawFilter” are useless as they are ignored when hardware acceleration is turned on!
canvas.setDrawFilter(new PaintFlagsDrawFilter(1, Paint.ANTI_ALIAS_FLAG));
Am I missing something or is it just a limitation of the hardware rendering method ? Is there any alternative?
Setting the antialias flag on the paint would not help anyway. To get antialiased borders on bitmap when rotating them you should add a 1px transparent border around them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With