I am writing an app that needs to capture a users signature in a vector format. On iOS I am using an SVG element to draw to then converting that SVG vector into the vector format I need.
Now I need to do this in Android 2.x. The issue with this is that Android only supports the canvas for drawing.
Is there anyway to trace the user drawing on the canvas so that I get a vector format? Since the canvas creates a raster image I can’t convert it to a vector.
Any ideas would be helpful.
Thanks
I don’t believe this is supported directly. I think your best bet is to subclass
android.graphics.Pathand overridemoveTo(int, int)andlineTo(int, int), after storing these events you could then create atoSvgPathString()and get the “M x,y L x,y x,y x,y ..” string you need.