SVG for Alejandro

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: SVG for Alejandro

Post by bogs »

What you added to it made a night/day difference from what I saw :wink:

Mind you, I am not by any means denigrating Ian's work on the initial stacks, but don't think you should play down the value added by your own additions.
Image
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: SVG for Alejandro

Post by bn »

I guess you are aware of the option to import .svg files into images in LC 9.

create an image "i1" and try with the current LC 9.0.2

Code: Select all

on mouseUp
   lock screen
   answer file "choose" with type "SVG image|svg"
   if it is empty then exit mouseUp
   
   put it into tFile
   put URL ("binfile:" & tFile) into tSVG
   put drawingSvgCompileFile(tFile) into tImage
   set the text of image "i1" to tImage
   set the topLeft of image "i1" to 20,20
   unlock screen
end mouseUp
not everything works but it is a huge step forward.
See dictionary for drawingSvgCompileFile

Kind regards
Bernd
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: SVG for Alejandro

Post by bogs »

Thank you Bernd, I do know they put it in somewhere after 8.x, but that isn't much of a help to me for a number of reasons.

I think I almost have what I need put together now though, taking a (slightly) different tack on it :wink:
Image
capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: SVG for Alejandro

Post by capellan »

Brian Milby posted a very useful stack named "SvgDrawingTool"
in this forum thread:
viewtopic.php?t=30441

In the words of Brian: This stack allows you to open a folder of
SVG drawings and then compare how they display as
1) a compiled svg drawing
2) as a path (suitable for the icon widget)
3) within the browser widget

Al
Last edited by capellan on Mon Jan 14, 2019 3:30 pm, edited 1 time in total.
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: SVG for Alejandro

Post by bogs »

Thanks Al, while the stack as is wouldn't work for my purposes (I would guess need a minimum Lc 8.1.x), I will look at his path drawing code, as that part might give me a head start on what I was intending.

I'll go post the error it hit running here in the other thread :D

*Edit - never mind, I saw they figured it out later.

Like I said earlier, the stacks right here worked out the best for me. I'm not likely to switch out to later versions of Lc just for this type of stuff, among other things, the later IDEs run too wonky on my system if they run at all.
Image
capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: SVG for Alejandro

Post by capellan »

Bogs, Did you report to RunRev these IDE problems?

Al
Post Reply