Release 9.0.0 DP7 / SVG / The book of the film of the poem

2017-07-03 Thread Alejandro Tejada via use-livecode
Hi Frans,

> Many thanks for your assistance!

Glad to help! but SVG file format inherent problems
will remain problematic for some time to come:

"Allowing JavaScript within SVG sounds like a
“Wouldn’t that be neat” idea that someone threw
in without much thought about the security
consequences. It makes SVG inherently riskier
than other image formats."

https://madfileformatscience.garymcgath.com/2016/11/21/svg-images/

By the way, How many different SVG file versions
already exists? At least 30 or 40 (maybe more) and
the only software that renders correctly most of them
is Google Chrome...

Looks like every Design software produces 3 or 4
(maybe more) different SVG versions... and if you
try to open a SVG produced in one Design program
using another Design program, the results are mostly
problematic and sometimes, the same Design program
that exported a SVG file could not open it correctly again...

Previously, in this mail list, we have discussed about
these (and others) SVG problems so it's not necessary
to repeat ourselves again. Now, I am taking a close look
at Xara 365 (Low cost program) and Microsoft Design
Expression (Free) to create WIX and XAML files compatible
with LiveCode vector graphics.

> I tried to write a script to adapt some of the SVG files
> at hand according to your instructions but that got me
> into a lot of offset problems and the widget ran into
> a lot of “exceeds boundary “ or something similar in
> rendering. I have written “translation scripts” for 30 years
> now but this one is a bit fickle.

It's SVG file format that is fickle. I discover this while
updating scripts for stack "SVGL":
http://livecodeshare.runrev.com/stack/112/SVGL

When I changed the code to import correctly
one particular SVG file, scripts breaks for
the rest of SVG files and a closer look at the
SVG source does not reveal why this happens.

After some though, I reach the conclusion that
using XAML (a Microsoft format) or WIX (Xara Text format)
would be less stressful and more productive
for LiveCode developers.

> But for the sake of letting everybody know: the solution
> of SVG rendering strokes combined with  RGB fills of
> Alejandro below works. I must admit that it helped that
> he had already pinpointed the RGB ones with a stroke
> (sound like a disease doesn’t it).

For this, just use a text editor like NotePad ++
This Text Editor could find a string in all files
within a folder. This is very useful to find paths
with a fill and a stroke within your thousands of
svg files.

> Duplicating the lines manually and replacing with
> “fill:none” did the trick: The SVG then renders
> exactly as in Illustrator and in Affinity Designer.
[snip]
> maybe one of the authors of the widget has an idea
> on how to bypass this/implement it in the LCB code.

You want to talk with Peter Thirkell and Mark Wieder:
http://forums.livecode.com/viewtopic.php?f=93=27811=30

By the way Frans, you could import Adobe Ilustrator files
(version 7or 5.5) into LiveCode and use multicolor gradients
in your ilustrations. Download and test this stack posted
many, many years ago:
http://andregarzia.on-rev.com/alejandro/stacks/Eps_Import_V05C.zip

Have a nice week!

Al
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Release 9.0.0 DP7 / SVG / The book of the film of the poem/ Alejandro solved it.

2017-07-03 Thread Frans Schoffelen via use-livecode
Hi Alejandro, 

sorry for the delayed answer. Busy times. I tried to write a script to adapt 
some of the SVG files at hand
according to your instructions but that got me into a lot of offset problems 
and the widget ran into
a lot of “exceeds boundary “ or something similar in rendering. I have written 
“translation scripts” for 30 years
now but this one is a bit fickle.

But for the sake of letting everybody know :  the solution of SVG rendering 
strokes combined with  RGB fills of Alejandro below works. 

I must admit that it helped that he had already pinpointed the RGB ones with a 
stroke ( sound like a disease doesn’t it).

Duplicating the lines manually and replacing with “fill:none” did the trick : 
The SVG then renders exactly as in Illustrator and in Affinity Designer.

Picture :

https://www.dropbox.com/s/79beopxkyy63sqw/PUPPET%20SSVG%20with%20Alejandros%20changes.png?dl=0

As it stands I will still have to figure out a reproducible and reliable way of 
finding an duplicating in the SVG-text or maybe
one of the authors of the widget has an idea on how to bypass this/implement it 
in the LCB code. 

Many thanks for your assistance!


kind regards

Frans Schoffelen, Berlin


> 
> 
> From: Alejandro Tejada <capellan2...@gmail.com>
> Subject: Release 9.0.0 DP7 / SVG / The book of the film of the poem
> Date: 29 June 2017 at 21:55:00 GMT+2
> To: use-livecode@lists.runrev.com
> 
> 
> Hi Franz,
> 
> I found a temporal solution for a limitation that you found
> in the SVG MultiColor widget.
> 
> Looks like every vector path rendered in this SVG MultiColor
> widget could have a fill or a stroke, but not both. If a path
> have a fill color, the stroke is not rendered.
> 
> The workaround for this limitation is to duplicate those few
> paths that have a non empty fill and a stroke and change
> the fill atribute of duplicated line to fill:none
> 
> In the sample svg file that you posted, there are only 7 paths
> that you must duplicate and replace the fill atribute to fill:none
> 
> path d="M93.86,48.612C93.86...
> path d="M66.405,228.331C66.751...
> path d="M30.188,194.513C30.188...
> path d="M30.354,51.441C30.354...
> path d="M33.794,64.434C33.794...
> path d="M97.419,64.848C97.419...
> path d="M93.86,48.612C93.86...
> 
> Duplicating these very few lines in every svg file is
> the easiest and fastest way to jump over this
> limitation (until a new version of SVG Multicolor
> widget is released). It's relatively easy to create
> a Livecode script that automate this task, but
> someone in your team should verify that both
> svg files (original svg and modified svg for importing
> into LiveCode) are visually identical.
> 
> In a previous message, you wrote that you have
> thousands of files to import into a Livecode app.
> This is the reason why I took a closer look at it.
> 
> By the way, are you compressing these SVG
> paths data before using them inside widgets?
> Probably, you could reduce a lot the size of your app
> if you compress this SVG path data.
> 
> Also, I noticed that your SVG path data uses
> 3 decimal points (like 51.088)
> Please, check if changing for 2 decimal points
> (like 51.09) do not change too much the
> appearance of your files.
> 
> Tell us if this advice works fine in your own project.
> You will be saving a lot of time for others that find
> these same problems.
> 
> Al
> 

Frans Schoffelen
http://knowlegistics.com  // Software & Sound // Berlin



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Release 9.0.0 DP7 / SVG / The book of the film of the poem

2017-06-29 Thread Alejandro Tejada via use-livecode
Hi Franz,

I found a temporal solution for a limitation that you found
in the SVG MultiColor widget.

Looks like every vector path rendered in this SVG MultiColor
widget could have a fill or a stroke, but not both. If a path
have a fill color, the stroke is not rendered.

The workaround for this limitation is to duplicate those few
paths that have a non empty fill and a stroke and change
the fill atribute of duplicated line to fill:none

In the sample svg file that you posted, there are only 7 paths
that you must duplicate and replace the fill atribute to fill:none

path d="M93.86,48.612C93.86...
path d="M66.405,228.331C66.751...
path d="M30.188,194.513C30.188...
path d="M30.354,51.441C30.354...
path d="M33.794,64.434C33.794...
path d="M97.419,64.848C97.419...
path d="M93.86,48.612C93.86...

Duplicating these very few lines in every svg file is
the easiest and fastest way to jump over this
limitation (until a new version of SVG Multicolor
widget is released). It's relatively easy to create
a Livecode script that automate this task, but
someone in your team should verify that both
svg files (original svg and modified svg for importing
into LiveCode) are visually identical.

In a previous message, you wrote that you have
thousands of files to import into a Livecode app.
This is the reason why I took a closer look at it.

By the way, are you compressing these SVG
paths data before using them inside widgets?
Probably, you could reduce a lot the size of your app
if you compress this SVG path data.

Also, I noticed that your SVG path data uses
3 decimal points (like 51.088)
Please, check if changing for 2 decimal points
(like 51.09) do not change too much the
appearance of your files.

Tell us if this advice works fine in your own project.
You will be saving a lot of time for others that find
these same problems.

Al
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Release 9.0.0 DP7 / SVG / The book of the film of the poem

2017-06-24 Thread Frans Schoffelen via use-livecode

> On 23 Jun 2017, at 19:24, use-livecode-requ...@lists.runrev.com wrote:
> 
> 
> On 2017-06-23 14:36, Frans Schoffelen via use-livecode wrote:
>> Progress! But still not quite there yet.
>> Picture link of screenshot :
>> https://www.dropbox.com/s/b867mchlhyoornz/SVG.af-SVG-LC.png?dl=0 
>> 
> 
> Can you share the SVG file which is generated by Affinity designer?
> 
> Thanks,
> 
> Mark.

Thanks Mark,

I uploaded the SVG text exactly as I copied it out of the file and a text file 
AND
the Affinity designer file. Hope this gives some insight . I appreciate any 
hint.

text of SVG ( as pasted into the widget )
https://www.dropbox.com/s/lu024cmjh31dy3w/Puppet%20svg%20text.txt?dl=0

the AF designer file :
https://www.dropbox.com/s/9pe3lstaurbmy9i/POPNewAF_EXPORT.svg?dl=0

(I did try FLAT and  PRINT export options, also tried grouped vs non grouped)

This one works but does not show a lot of strokes in there.

Warmest regards

Frans



Frans Schoffelen
http://knowlegistics.com  // Software & Sound // Berlin



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Release 9.0.0 DP7 / SVG / The book of the film

2017-06-23 Thread Mark Waddingham via use-livecode

Hi Frans,

On 2017-06-23 14:36, Frans Schoffelen via use-livecode wrote:

Progress! But still not quite there yet.

Picture link of screenshot :

https://www.dropbox.com/s/b867mchlhyoornz/SVG.af-SVG-LC.png?dl=0


Can you share the SVG file which is generated by Affinity designer?

Thanks,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Release 9.0.0 DP7 / SVG / The book of the film

2017-06-23 Thread Frans Schoffelen via use-livecode
Hello all, I took Mark’s and Peter’s advice and tried Affinity Designer and 
recompiled for DP7.
Color SVG widget works again. That is cool! And indeed the SGV churned out by 
Affinity works in the widget immediately .
With a few problems remaining that I hope to be able to pin point with maybe 
some help.

I tried exporting via all four presets ( export, print,web etc) in either 
grouped or non-grouped fashion.
The code still fails to produce a lot of strokes but not all ( which is strange)

If you will, please take a look at the picture (DROPBOX LINK below).The left is 
the SVG created by AFdesigner from an AI file and then previewed
in Finder, the right is what the widget makes of that SVG code when pasted into 
the widget. Anybody any idea how I can get those strokes
showing? Or rather : Why are some showing and other not?

Progress! But still not quite there yet.

Picture link of screenshot :  

https://www.dropbox.com/s/b867mchlhyoornz/SVG.af-SVG-LC.png?dl=0

I have to get on with this and can’t just wait until in August Mark will do his 
SVG stuff in Livecode Global.
And yes, the puppet has a massive load of clothes and personalities. They are 
from an app that WAS
on the App Store for two years but needs to be updated to 64 bit, small 
executable, for all screen sizes , easily draggable and resizable ….etc etc 
…thousands of SVG’s ….

Any help welcome!
warm regards

Frans


Frans Schoffelen
Knowlegistics.com 




> On 16 Jun 2017, at 12:08, Frans Schoffelen  > wrote:
> 
> Thanks Mark,
> 
> I did not know that we had to recompile every single dp.I had recompiled with 
> dp6…
> 
> I will hear in hindsight what you can tell us about SVG implementation in 
> August since
> I’ll be temporarily leading a small development team at a different company 
> and have
> no time to spare for the LiveCode Global sessions.
> 
> Hope it will involve complex SVG paths, colours, strokes and joins. Maybe 
> even a hint of animation?
> 
> Good luck to the team with the DP’s and of course with the Global Sessions.
> 
> Warmest regards
> 
> Frans
> 
> 
> 
> 
>> On 16 Jun 2017, at 12:00, use-livecode-requ...@lists.runrev.com 
>>  wrote:
>> 
>> From: Mark Waddingham >
>> Subject: Re: Re : Release 9.0.0 DP7
>> Date: 16 June 2017 at 11:01:25 GMT+2
>> To: How to use LiveCode > >
>> 
>> 
>> On 2017-06-16 10:55, Frans Schoffelen via use-livecode wrote:
>>> Hi,
>>> am I correct in seeing no progress  on the COLOUR SVG front? Even
>>> worse  : Now even Peter Thirkels
>>> widget has to be uninstalled. I was under the impression that
>>> implementation or at least clear definition  was imminent?
>>> Maybe I’m missing something?
>>> When will the format for colour SVG requirements ( svg-code style etc)
>>> be fixed so that widget designers can invest time?
>> 
>> I suspect Peter's widget just needs to be recompiled to work in 9 - if you 
>> grab the lcb file from the forums, put it in a folder and use the Extension 
>> Builder to compile / install it then there's no reason I can think of why it 
>> wouldn't work.
>> 
>> In terms of more work on the SVG front, I'll be doing a talk in August in 
>> LiveCode Global about SVG:
>> 
>> https://livecode.com/global/#schedule 
>> 
>> Warmest Regards,
>> 
>> Mark.
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode