2

I've just noticed that despite Canvas.drawBitmap() taking float coordinates (some variants, at least), it performs no sub-pixel anti-aliasing when blitting. That is, the bitmap is always drawn at exact integer coordinates (in my code I use no scaling, canvas matrix is identity, done paint.setFilterBitmap(true)).

Can someone confirm this observation? If this is not supported, are there any known plans to include the anti-aliasing blitting feature?

4

1 回答 1

1

根据 Romain Guy 在类似的 Google 小组问题中的说法:

如果当前变换只是一个平移,位图(和其他图元)总是以像素对齐的方式绘制。任何其他变换都将执行亚像素定位。

所以一个简单的解决方案是

Canvas.scale(1.00001f, 1.00001f);
于 2014-11-26T11:21:27.497 回答