涉及到的知识
1、canvas 2、path和二阶贝塞尔曲线 3、bitmap绘制
canvas
先引用google官方:
The Canvas class holds the “draw” calls. To draw something, you need 4 basic components: A Bitmap to hold the pixels, a Canvas to host the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, Path, text, Bitmap), and a paint (to describe the colors and styles for the drawing).
canvas画布,Android中绘制时,需要四个基本要素:bitmap用于存放像素点,canvas来进行绘制,基础形状:矩形,path,text,bitmap等,paint用于控制绘制的颜色和样式,canvas相关的很重要的一点是,在Android中坐标的原点是从左上角开始。
Path
1.moveTo moveTo表示将绘制点移动到某一个坐标处,该方法并不会进行绘制,主要是用来移动画笔。默认情况下起始坐标位于(0,0)点