separate cairo surfaces for SVG elements

"Jayesh Salvi" <[email protected]>
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <[email protected]>
Hi,

For past couple of weeks, I have been hacking librsvg to get it to do what I
want: draw an individual SVG element (rect, path, text, circle, ellipse,
etc.) on a cairo surface of its own size. But I haven't been completely
successful yet. So I decided to post on the mailing list if someone can
suggest a simpler way.

I started from test-display.c code which gives the above functionality but
it will draw the individual element at its relative location in the complete
SVG image.

The interface I want from the library is: Given an ID of the element, the
interface function will give me the boundaries of that element (bbox). Then
I can create a cairo_surface of that size and pass in the cairo_t through
another function. Then the library will draw only that element on that
cairo_t context.

for e.g
bbox = get_element_dimensions(handle, "#path1234")
surface = cairo_image_surface_create(..,bbox.w,bbox.h)
cr = cairo_create(surface)
draw_element(handle,"#path1234",cr)

I am haven't fully understood the matrix transformation that takes place at
several places, so I am having tough time to implement the above interface.

If anyone can suggest a better method or point out some part of API that
already offers this and I have ignored, I will be very greatful.

Thanks in advance.
Jayesh

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
Librsvg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/librsvg-devel
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.