The coming of SVG

Mark Waddingham mark at livecode.com
Mon Nov 6 11:52:36 EST 2017


On 2017-11-06 15:34, Ben Rubinstein via use-livecode wrote:
> This might be a stupid question, but might it be possible for this new
> control to completely replace the existing image control?

It isn't a stupid question...

> There aren't very many special properties relating especially to
> images. If the new object implemented those at least to a first
> approximation, then perhaps it could simply be called "image". All
> existing uses of images would work, and the gloss would be that the
> image object had gained some exciting new capabilities.

The way to look at it is that there is some 'abstract interface' (i.e. 
collection of properties and commands etc.) which are what makes an 
image imagey - then any control which implemented them *could* be 
considered an 'image' (from the point of view of the chunk).

There's certainly something there in terms of an idea for evolution of 
object chunks and such, but I'd be hesitant to try to get there right 
now without a good deal more analysis of how that might work (and 
whether such a suitable interface can be defined for 'image').

I think the best way to get images to like SVG is to allow an SVG file 
to be set as the text of the image - the image object used to have EMF 
and PICT support (I think it still may have EMF, but PICT disappeared 
with Carbon/Classic API usage) - so there is precedent.

Additionally, if we extend imageSource/icon references to be more 
general (i.e. internally any control which implements the 'I can be an 
icon' type set of actions could be used) - then I'm not sure whether 
there will be many cases left where you might want a 
<whatevernewcontrolis> to actually be an image.

In any case, introducing a new control (which is far more than an image) 
in the first instance doesn't stop it at some point 'feeling' like an 
image from the point of view of script in the future so it seems like a 
getting the control into existence first is the best approach.

> Is this a mad dream?

That depends on whether it involves saying wibble, a pair of underpants 
and two pencils...

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