Create image from SVG widget

Klaus major-k klaus at
Tue Sep 22 04:08:13 EDT 2020

Hi Brian,

> Am 22.09.2020 um 05:38 schrieb Brian Milby via use-livecode <use-livecode at>:
> Here's a link to the post in the archives:
> I could get close, but still needed to work out a way to translate the path
> to improve upon what was already discussed.  (I can get the actual bounding
> box, but it doesn't really help with eliminating the need to use the cropIt
> handler.)

thank you very much, will take a look!

> On Mon, Sep 21, 2020 at 10:18 PM Brian Milby <brian at> wrote:
>> 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
>> ...
>>>> This may be what you're looking for:
>>>> put drawingSvgCompile(tFileText) into tDrawing
>>>> set the text of image "svgImage" to tDrawing
>>>> 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?



Klaus Major
klaus at

More information about the use-livecode mailing list