Skip to content

Commit a7361b9

Browse files
committed
README
1 parent c2b62fc commit a7361b9

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Image doodle for Android. You can undo, zoom, move, add text, textures, etc. Also, a powerful, customizable and extensible doodle framework & multi-function drawing board.
66

77
***Android图片涂鸦,具有撤消、缩放、移动、添加文字,贴图等功能。还是一个功能强大,可自定义和可扩展的涂鸦框架、多功能画板。***
8+
89
![01.gif](https://raw.githubusercontent.com/1993hzw/common/master/Doodle/01.gif)
910

1011
![01](https://raw.githubusercontent.com/1993hzw/common/master/Doodle/01.png)
@@ -136,7 +137,7 @@ mDoodleView.setColor(new DoodleColor(Color.RED));
136137
```
137138
Then, add the DoodleView to your layout. Now you can start doodling freely.
138139

139-
*** 把DoodleView添加到布局中,然后开始涂鸦。***
140+
***把DoodleView添加到布局中,然后开始涂鸦。***
140141

141142
# Demo 实例
142143

@@ -203,6 +204,8 @@ You can create a customized touch gesture detector like [DoodleTouchDetector](ht
203204

204205
***实现[IDoodleTouchDetector](https://github.com/1993hzw/Doodle/blob/master/doodle/src/main/java/cn/hzw/doodle/core/IDoodleTouchDetector.java)接口用于创建自定义手势识别器,比如DoodleTouchDetector***
205206

207+
*** [Others](https://github.com/1993hzw/Doodle/blob/master/extend.md)
208+
206209
# The developer 开发者
207210

208211

doodle/src/main/java/cn/hzw/doodle/DoodleView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private void initDoodleBitmap() {// 不用resize preview
222222
}
223223

224224
/**
225-
* 获取当前图片在View坐标系中的巨型区域
225+
* 获取当前图片在View坐标系中的矩型区域
226226
*
227227
* @return
228228
*/

extend.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
拓展代码
1+
Extended code 拓展代码
22
================
33

44
```
55
/**
6+
* Make the picture fill the display
67
* 使图片填充屏幕
78
*/
89
public void centerCrop() {
@@ -16,6 +17,7 @@ public void centerCrop() {
1617

1718
```
1819
/**
20+
* Text item that does not follow the zoom
1921
* 不跟随缩放变化的文字item
2022
*/
2123
public class FixedSizeDoodleText extends DoodleText {
@@ -28,15 +30,15 @@ public class FixedSizeDoodleText extends DoodleText {
2830
@Override
2931
public void setSize(float size) {
3032
super.setSize(size);
31-
if (getDoodle() != null) { // 记录缩放前的倍数
33+
if (getDoodle() != null) { // Record multiples before scaling. 记录缩放前的倍数
3234
mScaleBefore = getDoodle().getDoodleScale();
3335
}
3436
}
3537
3638
@Override
3739
public void doDraw(Canvas canvas) {
3840
float scaleAfter = getDoodle().getDoodleScale();
39-
setSize(mScaleBefore / scaleAfter * getSize()); // 缩放后重新设置大小
41+
setSize(mScaleBefore / scaleAfter * getSize()); // Resize after scaling. 缩放后重新设置大小
4042
super.doDraw(canvas);
4143
}
4244
}

0 commit comments

Comments
 (0)