44
A
回答
78
繪圖操作需要Paint
。在這Paint
你設置Paint.setFlags(Paint.ANTI_ALIAS_FLAG)
22
檢查了這一點。它使用相當平滑的邊緣.. 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爲全局。
相關問題
- 1. 筆畫質量/抗鋸齒與svg
- 2. OpenGL ES 2.0線比核心動畫顯得更加鋸齒。 iOS 4中可以使用抗鋸齒功能嗎?
- 3. 在HTML5畫布中填充洪泛後的抗鋸齒邊緣?
- 4. 如何在畫布和路徑中進行抗鋸齒
- 5. 我可以在CSS中設置抗鋸齒功能嗎?
- 6. 避免畫布元素中的抗鋸齒
- 7. Font.createFont +抗鋸齒
- 8. 在CALayer上動畫「轉換」屬性時進行抗鋸齒?
- 9. 我可以關閉HTML <canvas>元素的抗鋸齒嗎?
- 10. 用畫布繪製得到「鋸齒」
- 11. 在WPF圖像上禁用抗鋸齒
- 12. 抗鋸齒與GL_TRIANGLE_FAN
- 13. 抗鋸齒算法
- 14. 用消除鋸齒畫線
- 15. 在將圖像繪製到IE9中的畫布元素時禁用抗鋸齒
- 16. 克服鼠標事件的畫布線上的抗鋸齒效果
- 17. CAShapeLayer禁用抗鋸齒
- 18. UIImage ScaleToFit禁用抗鋸齒?
- 19. 如何撤消畫布反鋸齒?
- 20. Chrome中的鋸齒形畫布渲染
- 21. HTML5畫布筆劃不反鋸齒
- 22. 我可以禁用按鈕文本抗鋸齒
- 23. 我失去了抗鋸齒當我改變渲染器畫家在Matlab
- 24. 使用Xlib啓用抗鋸齒
- 25. 調整,如MS畫圖位圖 - 無抗鋸齒
- 26. 如何使用抗鋸齒輸出GraphicsRow?
- 27. 使用RoundedRect對UIBezierpath進行抗鋸齒
- 28. 使用CATransform3DRotate時的抗鋸齒行
- 29. 可以在Win32的8bpp位圖上繪製抗鋸齒文本嗎?
- 30. 關於Skia的抗鋸齒
是否有竅門,但多數民衆贊成setFlags,而不是setFlag。 – xtr
你可以使用'mPaint.setAntiAlias(true);'而不是像Arun Chettoor建議的那樣 –