[cairo] adding canvas/javascript backend

Geert Jansen geert at boskant.nl
Mon Jan 7 09:38:02 PST 2008

Gerdus van Zyl wrote:

> I think a better solution would be to make web server for something
> like VNC. Simpler at least.

Simpler yes, but using VNC would mean you need a plugin in your
browser.. Also SVG is declarative which makes it less suitable if you
need to update the image dynamically. The imperative nature of
javascript drawing commands working on a canvas better fits this use case.

> Otherwise start with the SVG backend as template since it also outputs
> XML-like instructions.

Ok thanks for the tip. I actually looked at this backend a bit and with
> 3.000 lines it seemed quite big. I was wondering if there was maybe
some documentation on what is minimally required to add new backend?

Finally do you know if the imaging models of Mozilla's 2d canvas and
Cairo are compatible? I'm no expert in this area so I can only see that
superficially they look the same but I'd like to prevent finding out
that there's fundamental differences after putting a lot of work in this.

Regards, Geert

More information about the cairo mailing list