如何绘制多边形填充? [英] How to draw filled polygon?
本文介绍了如何绘制多边形填充?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何绘制多边形填充在Android的?
How to draw filled polygon in Android ?
推荐答案
您需要设置漆对象填充
Paint paint = new Paint();
paint.setStyle(Paint.Style.FILL);
然后就可以画出任何你想要的,它会被填充。
Then you can draw whatever you want, and it will be filled.
canvas.drawCircle(20, 20, 15, paint);
canvas.drawRectangle(60, 20, 15, paint);
等。
有关更复杂的形状,你需要使用路径对象。
For more complex shapes you need to use the PATH object.
这篇关于如何绘制多边形填充?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文