[cairo] adding canvas/javascript backend

Gerdus van Zyl gerdusvanzyl at gmail.com
Sun Jan 6 03:29:06 PST 2008


I think a better solution would be to make web server for something
like VNC. Simpler at least.
Otherwise start with the SVG backend as template since it also outputs
XML-like instructions.

Or simply just use cairo's SVG backend to output SVG and deliver that
to the browser.

~Gerdus

On Jan 5, 2008 8:47 PM, Geert Jansen <geert at boskant.nl> wrote:
> Hi,
>
> what would it take to add a new backend to Cairo that outputs a HTML5
> <canvas> with Javascript drawing instructions? I have looked into
> <canvas> a little bit and the imaging model looks very similar to
> Cairo's (maybe this is not coincidental). Documentation on <canvas> as
> implemented in Firefox can be found here:
> http://developer.mozilla.org/en/docs/Canvas_tutorial
>
> Why add a canvas backend you may ask? Well, I thought it would be cool
> to see if it is possible to port GTK+ to the web browser. With this I
> mean that you'd be able to run a GTK+ app on a Linux system and instead
> of displaying on X11 you'd display to a (possibly remote) web browser.
> GTK uses Cairo for rendering. You'd need some Ajax/Comet infrastructure
> to incrementally send the Javascript drawing commands to the browser,
> and send events such as mouse events and key presses back. Unless I'm
> overseeing something big this should be sufficient to display a
> conventional desktop application on the web..
>
> What do you think?
>
> Regards,
> Geert
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>


More information about the cairo mailing list