Canvas的意思就是畫布
Paint 代表了Canvas上的畫筆
以下範列記錄幾種Canvas繪製幾何圖向的方法
canvas.drawArc (扇形)
canvas.drawCircle(圓)
canvas.drawOval(橢圓)
canvas.drawPoint(點)
canvas.drawRect(矩形)
canvas.drawRoundRect(圓角矩形)
canvas.drawLine(線)
cnavas.drawPath(路徑)
DrawCircle
DrawArc
DrawOval
DrawLine
DrawPath
DrawPoints
DrawRect
DrawRoundRect
完整程式碼:
https://github.com/evanchen76/CanvasSample
沒有留言:
張貼留言