Re: Scaling SVG images

"Dominic Lachowicz" <[email protected]>
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <[email protected]>
> But if  i dont want to use Cairo as my backend... then is there any other
> way ?

Why don't you want to use Cairo as your backend? We don't really
support the GdkPixbuf backend except as a legacy backend, kept for API
and ABI guarantees.

> I think one way is by using DOM information.
> does librsvg supports the DOM tree features for svg images ?
> Is there any support for this in librsvg library ?
> Any sample code or tutorials will also work...

Librsvg has an internal tree-like representation of the SVG image.
However, I don't see how this would help you when you want to scale
the image. You'd still need to re-render it at the new size. You would
save some time parsing the XML, I suppose.

I *guess* that you could load the RsvgHande from a file, and then use
the set_size_callback() function, and then call
rsvg_handle_get_pixbuf(). The size_callback function will be called,
and you can tell it how large to make the image. But I honestly don't
remember if that will work or not.

Dom

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.