Skip to content

An Android custom view which let user sign or draw and it's will be saved as a PNG file

Notifications You must be signed in to change notification settings

roscrazy/DrawingView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SignView

An Android custom view which let user signing or drawing and it's will be saved to an output stream. The special thing is you can draw a smooth line and the stroke size will change gradually depend on your speed. There are two values you should care about:

  • sign:filterWeight="0.2"
  • sign:strokeSize="@dimen/signWidth"
  1. filterWeight : How the stroke size will be changed when user change his finger speed(this value effect on the lowpass filter to mitigate velocity aberrations). You can set this value from 0 -> 1, and figure out which value suit for your app.
  2. strokeSize : The biggest stroke size when user drawing.

And one more thing : To draw smooth line, I use the floating point number so, it's kind of difficult to optimise the view(ex: using bitwise operators...)

Example :

alt tag

alt tag

About

An Android custom view which let user sign or draw and it's will be saved as a PNG file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages