drawingSVGcompile Wish List

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

drawingSVGcompile Wish List

Post by capellan » Thu Jan 11, 2018 10:24 pm

Hi All,

I have been testing the new function drawingSVGcompile (LC9dp11 only)
and want to praise Mark and every member of LC Developer Team for
all their hard work. LC is more and more useful with each release.

This new function drawingSVGcompile is a giant leap towards complete
SVG support within LiveCode.

In this forum thread, I will be posting about features requested and bugs found.
Feel free to collaborate and post your svg files and report about working features
and bugs that you found.

Al

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: drawingSVGcompile Wish List

Post by bwmilby » Mon Jan 15, 2018 2:50 am

Based on the icon tool, I put this stack together today. It allows you to open a folder of SVG drawings and then compare how they display as just a path (suitable for the icon widget) and as a compiled svg drawing (in an image). For some, the only difference will be colors. Some have a size specified which makes the drawing version not scale. Some do have rendering problems with one or both methods.

EDIT: Added a browser widget to also get the rendering there as a comparison.
drawing-tool.jpg
drawing-tool2.jpg
Instructions:
Drag a folder of SVG drawings onto the stack. That will populate the list to allow you to view the drawings.
Attachments
SvgDrawingTool.livecode.zip
(13.59 KiB) Downloaded 344 times
Last edited by bwmilby on Tue Jan 23, 2018 1:30 am, edited 1 time in total.
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: drawingSVGcompile Wish List

Post by capellan » Wed Jan 17, 2018 2:34 am

Your stack is very useful! :D
Thanks a lot for posting it, Bryan.

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: drawingSVGcompile Wish List

Post by teriibi » Mon Jan 22, 2018 9:04 pm

Hi Brian, Cool work, thats excactly what I am about to look for into LC, SVG capabilities, and this looks very nice and more interesting now. :P

2 questions related to SVG.
1)
I´d like to use an SVG object as a button just as LC allows to import a picture and use it as a button with a script behind ? Is an svg, able to act like a button ? (script behind) with a little "button pressed/changed" effect so that user can assure button was pressed indeed ?

2) Can I use that SVG (button) area to auto-resize / move - with the rest of the stack so it can better integrate into a Responsive design Stack ? (multi-size screens) :?: :?:

Tks for any knowledge about both matters :wink:

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: drawingSVGcompile Wish List

Post by teriibi » Mon Jan 22, 2018 9:12 pm

Code: Select all

   put drawingSvgCompile(tFileText) into tDrawing
Debuger stops at this line of the SVG stack. error near drawing..., Char 8.
Am I missing a field on the stack or its a syntax error ?

Added an extra "tDrawing" Text field...but it didnt stop the bug.

lc plus 9 dp11

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: drawingSVGcompile Wish List

Post by bwmilby » Mon Jan 22, 2018 9:57 pm

Did you open a folder of SVG drawings first? I didn’t clear it out before packaging.

You can reference an image that uses SVG in a button. Depending on the specific SVG will determine whether it will scale (some files are fixed and the size won’t change, the image will just get clipped).
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: drawingSVGcompile Wish List

Post by teriibi » Mon Jan 22, 2018 10:21 pm

Hmm, not that I know of...
Do I have to do something before ?
...I just loaded the stack to run mode, and clicked on whatever svg name on the left column...whichever name I select, debugger opens... :oops:

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: drawingSVGcompile Wish List

Post by teriibi » Mon Jan 22, 2018 10:24 pm

Isnt the data code to draw all these svg Name from the column already included somewhere in that stack ?
:?:

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: drawingSVGcompile Wish List

Post by bwmilby » Mon Jan 22, 2018 11:46 pm

There is no SVG in the stack. You need to drag a folder of drawings to populate that list. The loaded list is from here:
https://github.com/leungwensen/svg-icon

I’ll try to post an update that includes a few examples.
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: drawingSVGcompile Wish List

Post by teriibi » Tue Jan 23, 2018 3:42 am

oK, I did that, pointed to a folder I downloaded. I believe all new folders samples are listed now. still, It shows me a sample while selecting one of them. than right after, opens debuger at the same error line. :roll: :roll:
An "empty list" Button would be fine adding too...
Image
Attachments
debugger stops.png

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: drawingSVGcompile Wish List

Post by bwmilby » Tue Jan 23, 2018 4:28 pm

What OS are you using? I developed/tested on MacOS. I just verified it works on Win10. I'll work on an update this evening and include a couple sample SVG files in the package.

Does it crash on every image you select?
Are you using Community Plus 9DP11?
Where did you get the SVG? I would like to try one that you are having problems with.
Last edited by bwmilby on Tue Jan 23, 2018 6:07 pm, edited 1 time in total.
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: drawingSVGcompile Wish List

Post by bogs » Tue Jan 23, 2018 5:26 pm

If I had to guess, I would suspect he is working in Windows from the path information in that picture.
Image

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: drawingSVGcompile Wish List

Post by teriibi » Tue Jan 23, 2018 6:06 pm

right, W10 64b
the original path was Github so I thought it had some autodownloading feature.

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: drawingSVGcompile Wish List

Post by bwmilby » Tue Jan 23, 2018 6:24 pm

Try this version. Be sure to extract the whole zip file into a folder including the SVG files.
I'm going to do some additional work tonight, but this one should at least open with a few examples that I know will render inside the stack.
Attachments
SvgDrawingTool.zip
(22.04 KiB) Downloaded 319 times
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: drawingSVGcompile Wish List

Post by teriibi » Tue Jan 23, 2018 8:31 pm

Perfect, I can see the 2 last frame displaying Svgs ! :mrgreen:
what is the first - left - empty frame for ?

Post Reply

Return to “Multimedia”