Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我喜欢做的是绘制一个多边形,完成后我想用半透明的颜色填充多边形。
我可以使用 canvas.drawLine(...) 绘制多边形,但无法填充它。
我知道在 java-awt 中这很容易,但我在 Android 中找不到它。
任何帮助表示赞赏。
谢谢。
你必须做这样的事情
Paint paint = new Paint(); paint.setStyle(Paint.Style.FILL);
并画
yourCanvas.drawPath(path,mPaint);
有关详细信息,您可以检查PAINT和PATH