Re: Persistent load

"Dominic Lachowicz" <[email protected]>
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <[email protected]>
This is really easy to do. Load the RsvgHandle from a file or wherever
you're getting it from. Then, use the rsvg-cairo.h header to render it
to a cairo_t. You can do arbitrary things to the cairo_t, like scale,
skew, rotate, and etc.

For example, if you'd like to load an image, and then render it at 2x
size, you might do something like the following pseudo-code:

// just load this once
rsvg = rsvg_handle_new_from_file(filename);

// inside of your draw()/expose() function
cr = gdk_cairo_create(gdk_drawable);
cr_scale(cr, scale_x, scale_y);
rsvg_cairo_render(cr, rsvg);

Best,
Dom

On 6/10/06, Max Lynch <[email protected]> wrote:
>
>
> I am curious how to load a file, then zoom it in and out without having to
> re-load it which is so slow.  I would like to have the svg+xml file parsed
> and the objects scaled from there without having to use the convenience
> functions (because they seem to reload the file every time).  Any ideas?
>
> Thank you.
>
>
>
> _______________________________________________
> Librsvg-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/librsvg-devel
>
>
>


-- 
Counting bodies like sheep to the rhythm of the war drums.
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.