maybe like thisAND the BIG question is how LiveCode think we are going to import
vector images with this:
or this Kind regards
Bernd
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
maybe like thisAND the BIG question is how LiveCode think we are going to import
vector images with this:
take the part inside the quotes starting with "M", without the quotes and paste that into the properties inspector field "svgPath"<path d="M345.714,950.934C345.714,997.483 304.78,1035.22 254.286,1035.22C203.791,1035.22 162.857,997.483 162.857,950.934C162.857,904.384 203.791,866.648 254.286,866.648C304.78,866.648 345.714,904.384 345.714,950.934Z"
Many Thanks for attaching this svg file.richmond62 wrote:I'm not sure why, but I seem unable to
import an SVG file generated by Karbon
[ https://www.calligra.org/karbon/ ].
unsupported attribute: stroke-linejoin: miter
unsupported attribute: stroke-miterlimit: 2.00000000000
unsupported attribute: fill-rule: evenodd
unsupported attribute: stroke-linecap: square
Yes, this is expected. I stopped working in SVGL plus GradientsUnfortunately with your "SVGL_plus_Gradients_ALPHA1_Inkscape_SVG.livecode"
the only SVG file that could be opened was "Smartphone.svg" and the results were
"artistic" - see the right-hand thumbnail
Code: Select all
local myfName ="" # <-- set path manually here instead of 'answer file'
-- ... this is my method to avoid the 'wheel of death' when testing
-- ... (and if I want to use always the same input for testing)
--> RightClick to avoid the dialog and use the same 'test-input' <---
on mouseUp b
if b<>3 or myfName is empty then
answer file "Please read in SVG-File"
if it is empty then exit mouseUp
put it into myfName
end if
put myfName into myFolder
set itemdel to "."; delete last item of myFolder
put "-svgSplit" after myFolder
if there is no folder myFolder then create folder myFolder
set itemdel to slash
put "/" & (last item of myfName) &"-" after myFolder
put url ("file:" & myfName) into mysvg
put "<path " into p0
set itemDel to p0 #<--- multichar delimiter needs LC 7 and above
put item 1 of mysvg into myHeader
put item -1 of mysvg into myFooter
put offset ("/>",myFooter) into a1
put p0 & char 1 to 1+a1 of myFooter into lastsvgPath
delete char 1 to 1+a1 of myFooter
put the num of items of mysvg into N
set numberformat to "##"
repeat with i=2 to N-1
put 0+i into i0
put myHeader & p0 & (item i of mysvg) & myFooter \
into url ("file:" & myFolder &(0+i)&".svg")
end repeat
put myHeader & p0 & (item 1+i of mysvg) & myFooter \
into url ("file:" & myFolder &(0+N)&".svg")
end mouseUp
Actually SVGL is the work of Ian McPhail from RunRev LTD.bogs wrote: ↑Sun Jan 13, 2019 9:48 amI just had opportunity to have need of similar routines and found this thread (sure, 3 years late to the party, what else is new? ) and had to agree with -hh's view, these stacks work incredibly well Al. I aspire to someday reach the neatness and organization of your 'sphagetti code' as well, but that is for another day