[cairo] cairo + librsvg = svg viewer

Luiz Americo Pereira Camara luizmed at oi.com.br
Sat Nov 14 08:59:25 PST 2009

philipp koehler escreveu:
> Hello,
> thank you guys for your answers.
> Luiz, your code-conversion for rsvg is exactly what I was looking for.
> Now I can include the rsvg library and compile under lazarus. Unfortunately I can not get the function "rsvg_handle_new_from_file" to work properly.

Are you working under Windows?

> In an code example based on code of your "RsvgClasses.pas" unit, the function "rsvg_handle_new_from_file" always returns NULL. I did not find a way to interpret the error codes neither.
> Maybe someone has an idea what could be the problem and how to solve it.

If you are using Lazarus you can try the svgviewer demo found in demos 
directory. It needs the cairolcl and rsvg packages found in 
luipack/cairo dir. I just fixed it now and is working under Windows 
although some images are not show.


More information about the cairo mailing list