Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iDan1230/ImageEditor

仿QQ图片编辑器,根据手势在图片上画矩形,圆,箭头,铅笔,擦除功能
https://github.com/iDan1230/ImageEditor

Last synced: about 1 month ago
JSON representation

仿QQ图片编辑器,根据手势在图片上画矩形,圆,箭头,铅笔,擦除功能

Awesome Lists containing this project

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.可以撤回上一个绘制的path

7.用法:

 代码中直接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;