From 5dcced9fd0a642be7035960339f549d3203a4dac Mon Sep 17 00:00:00 2001 From: jaysunxiao Date: Wed, 6 Jul 2022 18:02:11 +0800 Subject: [PATCH] doc --- doc/demo09_canvas/canvas.md | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/demo09_canvas/canvas.md b/doc/demo09_canvas/canvas.md index 1e2855b..7352aa0 100644 --- a/doc/demo09_canvas/canvas.md +++ b/doc/demo09_canvas/canvas.md @@ -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)