pull/2/head
jaysunxiao 2022-07-06 18:02:11 +08:00
parent 8ee59ef450
commit 5dcced9fd0
1 changed files with 26 additions and 7 deletions

View File

@ -1,9 +1,28 @@
# 1. CanvasItem之draw和update
![Image text](image/canvas1.png)
![Image text](image/canvas2.png)
![Image text](image/canvas3.png)
![Image text](image/canvas4.png)
![Image text](image/canvas5.png)
![Image text](image/canvas6.png)
![Image text](image/canvas7.png)
- Canvas是画布的意思所以CanvasItem代表了就是可以被绘制节点可以设置可视化界面和材质的颜色
![Image text](image/canvas1.png)
- 所有的2D节点和GUI节点都继承于CanvasItem节点
![Image text](image/canvas2.png)
- CanvasItem是按树的树的广度优先遍历顺序绘制的
![Image text](image/canvas3.png)
- draw指定了要绘制的东西
![Image text](image/canvas4.png)
- 当要draw绘制的改变了需要调用update
![Image text](image/canvas5.png)
- hide和show隐藏和现实节点
![Image text](image/canvas6.png)
- CanvasItem可以绘制直线正方形长方形图片
![Image text](image/canvas7.png)