Using a hidden browser widget to create a perfectly scalable LC control

Richard Gaskin ambassador at fourthworld.com
Thu May 11 16:49:14 CEST 2017


jonathandlynch wrote:

 > I just did an experiment. It appears to be possible to have an image
 > object that stores svg data in a custom property. It connects to a
 > hidden browser widget to do the following:
 >
 > - squirt the svg data into an HTML canvas
 > - resize the svg image using the setscale() method
 > - export the resized image (with transparency) to a variable
 > - pass that variable back to LC
 > - set the image content of the image to that variable
 >
 > The entire operation took 4 milliseconds for a moderate sized svg
 > image.
 >
 > This means we could have svg-quality resizable images, for responsive
 > design scripts.

Clever workaround, but looking at the bigger picture of platform 
adoption, do we really want to tell new users that to display SVGs you 
need to embed an entire browser application inside your application?

What is the purpose of the existing SVG widget if not to render SVGs?

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com



More information about the use-livecode mailing list