[cairo] cairo + librsvg = svg viewer

philipp koehler Flippinho at gmx.de
Sat Nov 14 07:37:23 PST 2009


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.
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.

thanks to all of you,
best regards, Philipp

-------- Original-Nachricht --------
> Datum: Wed, 28 Oct 2009 13:19:34 -0300
> Von: Luiz Americo Pereira Camara <luizmed at oi.com.br>
> An: 
> CC: "cairographics.org" <cairo at cairographics.org>
> Betreff: Re: [cairo] cairo + librsvg = svg viewer

> philipp koehler escreveu:
> > Hello,
> >
> > I am trying to do the same thing like you (display svg in
> Delphi-programs using cairo for rendering and librsvg for svg-parsing)and I have 
> > exactly the same problem like you.
> >
> > I was using the h2pas tool from Lazarus 
> > http://wiki.lazarus.freepascal.org/Creating_bindings_for_C_libraries
> > to do a header conversion of the librsvg.dll-headers I found on the
> gnome homepage. Unfortunatly I got stuck because in those header-files there
> are dependencies which point out of the scope covered by the header-files.
> > I was suspecting I had the wrong header files because afaik header-files
> for dynamic libs should not have outside dependencies except for maybe
> very basic libaries.
> > May be you have advanced a little bit in the problem of converting the
> librsvg header-files or have found other solutions to display svg in Delphi.
> >   
> 
> I did that with fpc/Lazarus almost a year ago.
> 
> Take a look at 
> http://code.google.com/p/luipack/source/browse/trunk/cairo/rsvg/rsvg.pas 
> . You can adapt for Delphi
> 
> Luiz
> 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo

-- 
DSL-Preisknaller: DSL Komplettpakete von GMX schon für 
16,99 Euro mtl.!* Hier klicken: http://portal.gmx.net/de/go/dsl02


More information about the cairo mailing list