The coming of SVG

Mark Waddingham mark at livecode.com
Fri Nov 3 12:05:51 EDT 2017


On 2017-11-03 14:19, Mark Waddingham via use-livecode wrote:
> Hi all,
> 
> My most recent talk at LCG (in October) was 'Building an SVG Widget'
> and in order to talk about such a thing, I needed to actually build
> one - so I did :)
> 
> So, we are now firmly on the road to full SVG support in LiveCode!

For anyone interested in the gory details, I've just submitted the 
initial PR
containing the implementation I did for LCG:

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

It consists of around 2000 lines of LCS, and 400 lines of LCB, along 
with
a specification text file.

This should be considered a Work-In-Progress - the name is currently 
vectoricon
and the persistent state of the widget is not yet stable. The former 
will get
updated when we finally decide on a suitable name; the latter will get 
updated
when I've finished planning the fine details of the initial set of 
properties
it needs.

The widget itself is really easy to use - you drag one out and set the 
'svgText'
property of the widget to the content of an SVG file (i.e. the actual 
XML text,
not a filename). If the SVG has a 'viewBox' top-level attribute, then 
that area
of the (SVG) 'canvas' will be scaled to fit into the widget's rect; 
otherwise the
canvas will be rendered as defined.

Warmest Regards,

Mark.

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




More information about the use-livecode mailing list