Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publicly accessible array of paths. #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KraigWastlund
Copy link

I found a need to grab all the paths in array form from the signature view.
This allows that option.

Thanks for the great repo

@alankarmisra
Copy link
Owner

Could you describe a use-case where this would be useful? I'm open to adding it but would prefer not to hold all the paths in memory if it's not useful. Note that you can get the complete bezier path even now (it's not public but we could make it public if you come up with a use-case where it makes sense). I know you sent this push request a long time ago, and I apologize for taking forever to get to it.

@KraigWastlund
Copy link
Author

Thanks for the response, I'll have to dig back into it .... lol ... it's been too long, I don't remember why I needed it. I think it was because I was creating my own .svg object and needed all the points to do so. I think I was saving the signature to core data with the points and then sending it up to a server so you could view the signature on other devices.

Perhaps you already have a hook that I just didn't see, but, that's what I remember at the moment.

@arthurdapaz
Copy link

The use case seems clear to me: generate a PDF/SVG version of the signature instead of a bitmap one.

I actually grabbed the old-archived UberSignature and added this myself, so I can have a scalable version of the signature. Also, we can use this data for Signature Comparison (which is very important for some sensitive business operations).

The worry about memory consumption can be truly discarded, in my belief. The task here is too small: hold some bezier paths inside an array. They are pure mathematical curves descriptions. Very lightweight by nature. But, if it is really a concern, maybe add a flag (false by default)? like:

public var holdSignaturePaths: Bool = false       // is this wounding some SOLID stuff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants