Create image from SVG widget

Brian Milby brian at milby7.com
Mon Sep 21 22:18:06 EDT 2020


You do not need a file, but you do need additional code.  I found a handler from a Sep 2018 thread that wraps a path to form the input needed for the compile.  LC Mark mentioned an internal call that could enhance the process but I didn’t see any code that leveraged it.  Let me take a crack at it and see what I come up with.

Sent from my iPhone

> On Sep 21, 2020, at 5:08 PM, Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi Brian
> 
>> Am 21.09.2020 um 23:03 schrieb Brian Milby via use-livecode <use-livecode at lists.runrev.com>:
>> 
>> This may be what you're looking for:
>> 
>> put drawingSvgCompile(tFileText) into tDrawing
>> set the text of image "svgImage" to tDrawing
>> http://forums.livecode.com/viewtopic.php?f=10&t=30441#p163024
>> The stack in the forum post will let you see the difference in how a
>> particular svg file is rendered in the browser widget, as a SVG path
>> (widget), and as a SVG Compiled Drawing (image).  There is some additional
>> code available that will translate the path (effectively trim extra space
>> around the image) that I have not incorporated.
> 
> thank you!
> 
> But I thought we could do this from a SVG widget without the need of a .svg FILE.
> Was I dreaming?
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> klaus at major-k.de
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list