SVG powered images

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SVG powered images

Bob Sneidar via use-livecode
Hi Hermann,

I tried to apply your script, but just get an error.
Surely, it's because I do follow correctly
your instructions:

> You could try to leave out the "liveCode.JStoLC" from the html.
> Instead send the conversion 'delayed", 1 tick should be enough:
 local svgb="SVGBrowser1"
 send "processSVG tID" to widget svgb
 put "var dd=document.getElementById('canvas1');" & \
     "liveCode.JStoLC(dd.toDataURL(),tID)") into js
 send "do js in widget svgb" to me in 1 tick

By the way, open and resize an animated SVG like this:
https://openclipart.org/download/188969/WalkingMan.svg

Notice how it changes to different animation frames
each time that you resize the image. :D

Al
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: SVG powered images

Bob Sneidar via use-livecode
My mistake, that previous message should read:
I tried to apply your script, but just get an error.
Surely, it's because I do NOT followed correctly
your instructions

On Thu, May 11, 2017 at 9:31 PM, Alejandro Tejada <[hidden email]>
wrote:

> Hi Hermann,
>
> I tried to apply your script, but just get an error.
> Surely, it's because I do follow correctly
> your instructions:
>
> > You could try to leave out the "liveCode.JStoLC" from the html.
> > Instead send the conversion 'delayed", 1 tick should be enough:
>  local svgb="SVGBrowser1"
>  send "processSVG tID" to widget svgb
>  put "var dd=document.getElementById('canvas1');" & \
>      "liveCode.JStoLC(dd.toDataURL(),tID)") into js
>  send "do js in widget svgb" to me in 1 tick
>
> By the way, open and resize an animated SVG like this:
> https://openclipart.org/download/188969/WalkingMan.svg
>
> Notice how it changes to different animation frames
> each time that you resize the image. :D
>
> Al
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: SVG powered images

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
To do an animation it would need a continuous but interruptible callback loop - with delayed sending for the next iteration after the previous iteration has finished.

I think it is doable.

Sent from my iPhone

> On May 11, 2017, at 9:31 PM, Alejandro Tejada via use-livecode <[hidden email]> wrote:
>
> Hi Hermann,
>
> I tried to apply your script, but just get an error.
> Surely, it's because I do follow correctly
> your instructions:
>
>> You could try to leave out the "liveCode.JStoLC" from the html.
>> Instead send the conversion 'delayed", 1 tick should be enough:
> local svgb="SVGBrowser1"
> send "processSVG tID" to widget svgb
> put "var dd=document.getElementById('canvas1');" & \
>     "liveCode.JStoLC(dd.toDataURL(),tID)") into js
> send "do js in widget svgb" to me in 1 tick
>
> By the way, open and resize an animated SVG like this:
> https://openclipart.org/download/188969/WalkingMan.svg
>
> Notice how it changes to different animation frames
> each time that you resize the image. :D
>
> Al
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: SVG powered images

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Hi Al,

> Am 12.05.2017 um 03:31 schrieb Alejandro Tejada via use-livecode <[hidden email]>:
>
> ...
> By the way, open and resize an animated SVG like this:
> https://openclipart.org/download/188969/WalkingMan.svg
>
> Notice how it changes to different animation frames
> each time that you resize the image. :D

not when viewed in Safari on a Mac!

> Al

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode