android-signaturepad icon indicating copy to clipboard operation
android-signaturepad copied to clipboard

Study a way of managing size changes

Open gcacace opened this issue 11 years ago • 4 comments
trafficstars

What to do when the view size changes? The signature should be cropped or shrinked?

gcacace avatar Mar 21 '14 10:03 gcacace

IMHO, just scaling it should be the propper behaviour. I will never crop it.

luixal avatar Aug 01 '15 12:08 luixal

Scaling to fit would be my preference too, or otherwise allow programmer to set own preference.

Working right now on a way of restoring the signature on activity restart and on orientation change (in my project, not the library). In my case the size of the SignaturePad would change depending on orientation.

Have been trying to use getSignatureSvg() to get the signature as SVG and then later parsing and painting it as a bitmap using BigBadaboom/androidsvg library. It seems to work fine (let me know if you want I can share the code with you) aside from a couple of issues: one where it needs to set a viewbox and new document size on the SVG to be able to scale it and second where subsequent getSignatureSvg() after the setSignatureBitmap() would return an empty SVG root with just the size and no contents.

dandar3 avatar May 05 '16 20:05 dandar3

library should manage this automatically, scale image would be the easier way

eriknyk avatar Oct 05 '18 00:10 eriknyk

Scaling to fit would be my preference too, or otherwise allow programmer to set own preference.

Working right now on a way of restoring the signature on activity restart and on orientation change (in my project, not the library). In my case the size of the SignaturePad would change depending on orientation.

Have been trying to use getSignatureSvg() to get the signature as SVG and then later parsing and painting it as a bitmap using BigBadaboom/androidsvg library. It seems to work fine (let me know if you want I can share the code with you) aside from a couple of issues: one where it needs to set a viewbox and new document size on the SVG to be able to scale it and second where subsequent getSignatureSvg() after the setSignatureBitmap() would return an empty SVG root with just the size and no contents.

My signature bitmap getting changed on orientation change. Struggling to resolve the issue from few days. Can you please share the code of this.

bharat8x avatar May 09 '20 12:05 bharat8x