我尝试调整像这样的图像:
aPaint.setAntiAlias(true); // Enabling this flag will cause all draw operations that support antialiasing to use it.
aPaint.setFilterBitmap(True); // enable bilinear sampling on scaled bitmaps. If cleared, scaled bitmaps will be drawn with nearest neighbor sampling, likely resulting in artifacts.
apaint.setDither(true); // Enabling this flag applies a dither to any blit operation where the target's colour space is more constrained than the source.
aCanvas.drawBitmap(aBitmap, aJSrcRect, aJDestRectf, apaint);
但是我没有很好的防眩图像(它是抗锯齿的,但不是很好)。这是显示我的问题的图像
我可以做些什么来提高android下的antialias的质量?
答案 0 :(得分:1)
对于抗锯齿效果,您可以尝试像这样创建一个Paint:
Paint paint= new Paint();
paint.setFlags(Paint.ANTI_ALIAS_FLAG);
paint.setAntiAlias(true);
paint.setFilterBitmap(true);
最后在画布上使用:
应用绘画canvas.drawBitmap(mBitmap, 0.f, 0.f, paint)