07.31.06
Notes on writing a new OpenLaszlo kernel; SVG
I’ve been interested in SVG (Scalable Vector Graphics) for a long time, and have thought
it would make a good runtime platform for OpenLaszlo applications. With the development of the Legals release, I wanted to see how difficult it would
be to port the DHTML kernel (which is still under development) to SVG. Since Firefox and Opera now support SVG 1.1 natively, it seemed like it was a good time to try this out. SVG is strong on graphics imaging and text rendering, I think of it like a free-software version of Adobe’s crown jewels.
With two days of hacking over the weekend, I got a large about of the Sprite API ported to SVG.
Here’s a version of the SVG kernel running, try this in Firefox: Try clicking on the gray area of the gray square, the red rect, or the blue rect, or the text string
http://www.beartronics.com/svg/svg.html
source of test LZX app
http://www.beartronics.com/svg/sprite.lzx
Flash version
http://www.beartronics.com/svg/sprite.lzx.swf
This tells me that the kernel API is pretty much on target, certainly for runtimes which have HTML/SVG javascript-like event handling.
I was disappointed to learn that SVG 1.1 (which is what Firefox supports now) does not handle input text or wrapping text regions, however
SVG 1.2 does have these, so I look forward to finishing this work when Firefox SVG 1.2 support is released, and then we will have
an OpenLaszlo runtime with the beautiful imaging model from SVG.
If time permits, I will try to clean up the SVG kernel enough to stick into an upcoming Legals release, so interested people can look at it. I
haven’t implemented image or data loading yet, and there’s some bugs with background color names and defaults.
SVG has been slow to gain traction, but I think it is one of the best hope for high quality portable graphics, and maybe even rich internet apps that
use them, in the future.
Permalink 36 Comments · Tags: openlaszlo, laszlo