Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iDan1230/ImageEditor
仿QQ图片编辑器,根据手势在图片上画矩形,圆,箭头,铅笔,擦除功能
https://github.com/iDan1230/ImageEditor
Last synced: about 1 month ago
JSON representation
仿QQ图片编辑器,根据手势在图片上画矩形,圆,箭头,铅笔,擦除功能
- Host: GitHub
- URL: https://github.com/iDan1230/ImageEditor
- Owner: iDan1230
- Created: 2017-05-09T10:05:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T05:03:49.000Z (over 7 years ago)
- Last Synced: 2024-05-22T06:12:20.107Z (7 months ago)
- Language: Java
- Homepage:
- Size: 632 KB
- Stars: 58
- Watchers: 2
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - ImageEditor - 仿QQ图片编辑器 (图片)
README
# ImageEditor
仿QQ图片编辑器,根据手势在图片上画矩形,圆,箭头,铅笔,擦除功能
新的项目中需要做一个类似QQ截图随手势编辑图片的功能
1.绘制矩形框
![image](https://github.com/yangzhidan/ImageEditor/blob/master/resultPic/0253F9CFE860517F25660C364DA22E04.jpg)
2.绘制圆
![image](https://github.com/yangzhidan/ImageEditor/blob/master/resultPic/E762357186E9CD1566E8E6BBC692812B.jpg)
3.绘制箭头
![image](https://github.com/yangzhidan/ImageEditor/blob/master/resultPic/58D93297EA25BDD5183C8F0D6C4F72CD.jpg)
4.铅笔画线
![image](https://github.com/yangzhidan/ImageEditor/blob/master/resultPic/3019C33D656C73C8C151146F20C0EC52.jpg)
5.文字输入
![image](https://github.com/yangzhidan/ImageEditor/blob/master/resultPic/D376FC2237A9A297FB67505F420D3C41.jpg)
6.可以撤回上一个绘制的path7.用法:
代码中直接new
surfce = new CustomSurfaceView(this, url, false);
传入不同参数实现绘制
case R.id.bianjia_0:
surfce.setState(0);//绘制矩形
break;
case R.id.bianjia_1:
surfce.setState(1);//绘制圆
break;
case R.id.bianjia_2:
surfce.setState(2);//绘制箭头:
break;
case R.id.bianjia_3:
surfce.setState(3);//铅笔绘制
break;
case R.id.bianjia_4:
surfce.setState(4);//输入文字
break;
case R.id.bianjia_5:
surfce.revocation();//擦除上一步
break;
case R.id.bianjia_6:
Bitmap bm = surfce.getBitmap();//获取最终的图片bitmap
break;