我可以在canvas上使用抗锯齿画吗?
我可以在canvas上使用抗锯齿画吗?
我需要我的圈子和线条有光滑的边缘。
绘图操作需要Paint 。 在这个Paint你设置了Paint.setFlags(Paint.ANTI_ALIAS_FLAG) 
看一下这个。 它相当平滑的边缘.. http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.html
获得消除锯齿所需的油漆属性是:
  mPaint = new Paint(); mPaint.setAntiAlias(true); 
绘图使用:
  mPath = new Path(); mPath.reset(); mPath.moveTo(x, y);//can be used where to trigger the path 
onDraw方法应该包含:
  canvas.drawPath(mPath, mPaint); 
声明mPath和mPaint为全局。