Page 1 of 1

widget Signature to SVG pathdata

Posted: Sat Jan 30, 2021 1:10 pm
by istech
Hi All,

I want to copy path data from a signature widget to a SVG widget. Is this possible? The path data appear to be in a different format. Is there a different process to follow?

Thanks

Re: widget Signature to SVG pathdata

Posted: Sun Jan 31, 2021 1:42 am
by stam
Hi istech,

I'm far from an expert in SVG but have had success by just copying the path data into the path in the inspector of an SVG widget. I open the SVG in a text editor and just copy the path data (without the surrounding quotes, usually starts with an 'M') into the path data of an SVG widget's inspector.

SVG is a mixed bag as far as i can tell. The following lesson explains how to apply the above in more complex SVGs
https://lessons.livecode.com/m/33498/l/ ... -extension

Hope that helps,
Stam

Re: widget Signature to SVG pathdata

Posted: Sun Jan 31, 2021 10:00 pm
by bobcole
Copying the path from a Signature widget works but not very well. In fact, it doesn't look good at all.
I was curious about this so I created a sample stack with the best I could figure out.
Maybe someone else can figure out a better solution.
Bob
Signature to SVG.livecode.zip
(6.06 KiB) Downloaded 226 times

Re: widget Signature to SVG pathdata

Posted: Mon Feb 01, 2021 3:00 am
by stam
Yes I find it doesn't always work - and depends largely on the type of SVG.
I more recently found that lesson on using Illustrator to modify the SVG before copying the path. I don't have illustrator sadly (i use Affinity Designer for vectors, but sadly doesn't seem to have the same functionality, or i don't know how to use it ;)

Do you have access to Illustrator to see if the advice in the lesson i linked above helps?

Re: widget Signature to SVG pathdata

Posted: Mon Feb 01, 2021 3:08 am
by bobcole
I don't have Illustrator either.
Maybe there is an Open Source Software app that would help; Inkscape might be worth a try.
Sorry, I don't have any other ideas at the moment.
Bob

Re: widget Signature to SVG pathdata

Posted: Tue Feb 02, 2021 4:06 pm
by istech
Thanks for your help all. I though there would be a straight forward way to do it and that maybe I was missing a command. That is not the case I suppose. :(

Saying that your stack is a great start to getting this working. It seems just the width and color data is missing for the svg widget. I'll see if it can be incorporated.

I must admit I only wanted to do it as the svg widget has some really cool features the signature widget does not have. Like setting the scaled width and height property which is not available on the signature widget.