On 2015-10-30 10:35, Frans Schoffelen wrote:
So how do we get started?

Well, on the SVG front things have already started:

https://github.com/livecode/livecode/pull/3089

This still needs a bit more work (we're hoping to have it ready for LiveCode 8 DP9) but currently does the following:

- Adds the ability for the engine to render SVG as part of its libgraphics library (internal, low-level)
   - Wraps this facility with canvas syntax which widgets can use
- Adds an SVGView widget which displays an svg file which has been set on it using an 'svgText' property

At the moment the SVG parser / renderer can cope with multiple transformed paths and shapes in solid colors with opacity (gradients are being irksome - there's something up with the transforms which I haven't gotten quite right yet).

We're also looking into allowing an image object to have its text set to SVG, or its filename set to reference an SVG file. If we can make this work then it means SVG will be usable (via the image object) as icons in buttons and imageSrc references in fields (as well as patterns!). Additionally, we'll investigate adding properties to the image object to indicate that the SVG should be pre-rendered as an image automatically. The reality is that compositing a pre-rendered image is a *lot* faster than rendering anything but exceptionally simple SVG - so providing a mode where pre-rendering occurs means that SVG used in images will have very similar performance characteristics to non-SVG images (after the initial rendering step). The goal here is that you can replace stacks of multi-resolution images with a single SVG file with hopefully only a small cost to pay on app startup.

Another thing we could potentially do is add a 'path' property to the graphic object which would take and return a (normalized) SVG path - I'm still poking around to see what it would take to do this. Obviously we will be replacing the graphic object with a new 'shape' object at some point, however it seems sensible to try and see if we can at least add the 'path' related facilities planned for it to the engine sooner.

Warmest Regards,

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

Reply via email to