为画布设置抗锯齿:
canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG));
Android开发者网站上对于PaintFlagsDrawFilter构造函数中的两个参数是这样解释的:
public PaintFlagsDrawFilter(int clearBits, int setBits)
Subclass of DrawFilter that affects every paint by first clearing the specified clearBits in the paint's flags, and then setting the specified setBits in the paint's flags.
Parameters
clearBits: These bits will be cleared in the paint's flags
setBits: These bits will be set in the paint's flags
具体啥意思,我也不清楚,有哪位大神原因赐教一下吗?