Re: SVG to image

2018-09-20 Thread Brian Milby via use-livecode
I just did a little bit of comparison of the path before and after your widget translated it. The path data is quite a bit different (besides just going to 6 decimal places). Something about how the path is adjusted makes it work better with the path compiler, but it does increase the compiled im

Re: SVG to image

2018-09-17 Thread Brian Milby via use-livecode
Ok, so your results should be the same as the "trimmed" version of the icons in this repo: https://github.com/leungwensen/svg-icon For most of the icons on that site, the removal of pad is fine. There are a few where the pad is actually important since there are multiple icons where some are desi

Re: SVG to image

2018-09-17 Thread hh via use-livecode
> Brian wrote: > I'll need to take your stack/widget and see how what it generates > compares to conversions from the source svg file (for the Font > Awesome stuff). Since you are adding back information that was > stripped when converting to an icon, my guess is that the results > should be pretty

Re: SVG to image

2018-09-17 Thread Klaus major-k via use-livecode
Hi Brian, > Am 17.09.2018 um 06:06 schrieb Brian Milby via use-livecode > : > > Jonathan's stack is very cool. I wasn't minimizing the work in the engine > though, just pointing out that particular images would need to be tested to > see which method provides the needed results. There can be s

Re: SVG to image

2018-09-16 Thread Brian Milby via use-livecode
Jonathan's stack is very cool. I wasn't minimizing the work in the engine though, just pointing out that particular images would need to be tested to see which method provides the needed results. There can be significant differences in the object size depending on which version is used (path, ful

Re: SVG to image

2018-09-16 Thread hh via use-livecode
BoundingBox widget / Compile iconPath to image The real point that came up here is how to get the bounding box of an SVG path that is used as iconPath of the svgIcon widget. With that it is simple to prepare the path as input for drawing

Re: SVG to image

2018-09-16 Thread Klaus major-k via use-livecode
Hi Brian, > Am 16.09.2018 um 22:14 schrieb Brian Milby via use-livecode > : > > I will point out that not everything will translate exactly between an icon > and a compiled drawing. See this thread on the forum: > http://forums.livecode.com/viewtopic.php?f=10&t=30441 > > I created a stack that

Re: SVG to image

2018-09-16 Thread Brian Milby via use-livecode
I will point out that not everything will translate exactly between an icon and a compiled drawing. See this thread on the forum: http://forums.livecode.com/viewtopic.php?f=10&t=30441 I created a stack that will take an SVG and display it in a browser widget, an icon, and as a compiled image. Yo

Re: SVG to image

2018-09-16 Thread Mark Waddingham via use-livecode
Perhaps the drawing library could do with 'CompileIcon' which does the wrapping as your code does and then compiles the resulting SVG XML. In the interim - IIRC - there is an '_internal' command used in the drawing library which returns the bbox of an SVG path string which will allow you to com

Re: SVG to image

2018-09-16 Thread hh via use-livecode
There is a problem with transparency in the result of drawingSVGcompile that my "cropIt" should remove: While an importer via javaScript (SVGHandles89 uses javaScript) removes the transparency from the data, it does it not with the result of drawingSVGcompile probably it doesn't use numToByte(0) f

Re: SVG to image

2018-09-16 Thread hh via use-livecode
Import the source of a SVG icon widget to a PNG file: + The iconPath of an SVG icon is path data only (could be used as "instructions" for a path in LCB). So try to write a wrapper around it to make it valid SSVG data. The problem is the boundi

Re: SVG to image

2018-09-16 Thread prothero--- via use-livecode
Good luck, Klaus. Bill William Prothero http://es.earthednet.org > On Sep 16, 2018, at 8:43 AM, Klaus major-k via use-livecode > wrote: > > Hi William, > >> Am 16.09.2018 um 17:37 schrieb prothero--- via use-livecode >> : >> >> Klaus, >> I would display the SVG image, then do a screen captu

Re: SVG to image

2018-09-16 Thread Klaus major-k via use-livecode
Hi William, > Am 16.09.2018 um 17:37 schrieb prothero--- via use-livecode > : > > Klaus, > I would display the SVG image, then do a screen capture of the rect of the > image. I'm not at my computer, and forget the specific commands, and it might > cause undesirable screen action, depending on

Re: SVG to image

2018-09-16 Thread prothero--- via use-livecode
Klaus, I would display the SVG image, then do a screen capture of the rect of the image. I'm not at my computer, and forget the specific commands, and it might cause undesirable screen action, depending on what you want it to do, but it would work. Bill William Prothero http://es.earthednet.or

SVG to image

2018-09-16 Thread Klaus major-k via use-livecode
Hi all, was I deaming when thinking we had a build-in way to convert an SVG icon to an image in LC to be used as an icon of a button? I can only find: "drawingSvgCompile" and "drawingSvgCompileFile" in the dictionary and they don't seem to support SVG icons only XML/SVG files? What am I missing