Page 1 of 2

drawingSVGcompile Wish List

Posted: Thu Jan 11, 2018 10:24 pm
by capellan
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

Re: drawingSVGcompile Wish List

Posted: Mon Jan 15, 2018 2:50 am
by bwmilby
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.

Re: drawingSVGcompile Wish List

Posted: Wed Jan 17, 2018 2:34 am
by capellan
Your stack is very useful! :D
Thanks a lot for posting it, Bryan.

Re: drawingSVGcompile Wish List

Posted: Mon Jan 22, 2018 9:04 pm
by teriibi
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:

Re: drawingSVGcompile Wish List

Posted: Mon Jan 22, 2018 9:12 pm
by teriibi

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

Re: drawingSVGcompile Wish List

Posted: Mon Jan 22, 2018 9:57 pm
by bwmilby
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).

Re: drawingSVGcompile Wish List

Posted: Mon Jan 22, 2018 10:21 pm
by teriibi
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:

Re: drawingSVGcompile Wish List

Posted: Mon Jan 22, 2018 10:24 pm
by teriibi
Isnt the data code to draw all these svg Name from the column already included somewhere in that stack ?
:?:

Re: drawingSVGcompile Wish List

Posted: Mon Jan 22, 2018 11:46 pm
by bwmilby
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.

Re: drawingSVGcompile Wish List

Posted: Tue Jan 23, 2018 3:42 am
by teriibi
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

Re: drawingSVGcompile Wish List

Posted: Tue Jan 23, 2018 4:28 pm
by bwmilby
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.

Re: drawingSVGcompile Wish List

Posted: Tue Jan 23, 2018 5:26 pm
by bogs
If I had to guess, I would suspect he is working in Windows from the path information in that picture.

Re: drawingSVGcompile Wish List

Posted: Tue Jan 23, 2018 6:06 pm
by teriibi
right, W10 64b
the original path was Github so I thought it had some autodownloading feature.

Re: drawingSVGcompile Wish List

Posted: Tue Jan 23, 2018 6:24 pm
by bwmilby
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.

Re: drawingSVGcompile Wish List

Posted: Tue Jan 23, 2018 8:31 pm
by teriibi
Perfect, I can see the 2 last frame displaying Svgs ! :mrgreen:
what is the first - left - empty frame for ?