Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunSheep committed Aug 26, 2017
2 parents 63ebe5a + 2c0c1bf commit 50e317a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/chi_docs.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

# 绘画板原理:

notice: pathview 没有绘制的能力,具备绘制能力的是PointPath

pathview doc,讲解pathview的事件处理
注意: athview 没有绘制的能力,具备绘制能力的是PointPath

这张图说明了:事件传递的过程、处理事件的方式

![](https://github.com/ShaunSheep/ScaleSketchPadDemo/blob/master/docs/patchviewdoc_chi.png)

# 基本知识:

Expand All @@ -14,20 +14,20 @@ View具有onTouchEvent(Motionevent event)函数,可以接收触摸事件
图,描述用户一次触摸滑动的过程,系统产生event的情况;打印log,画图无穷小的点


action test: finger down
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger up
action test: finger down
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger move
action test: finger up


# 实现思路

Uml图
![](https://github.com/ShaunSheep/ScaleSketchPadDemo/blob/master/docs/uml.png

PointPath 是实际具有绘画能力的类:
1. 存储点的状态(橡皮、普通点、粗细、颜色)
Expand All @@ -48,4 +48,4 @@ PathView 是PointPath的控制类,继承自View:
4. move和up结束前,都要invalidte
2. 橡皮擦功能
1. Paint.setXformode()属性,本质就是同一个位置,两个点进行集合运算
2. onDraw()中需要新建临时canvas,临时Bitmap
2. onDraw()中需要新建临时canvas,临时Bitmap

0 comments on commit 50e317a

Please sign in to comment.