Fwd: Re: [cairo] rsvg and cairo alpha puzzle

Bertram Felgenhauer <bertram.felgenhauer-gM/[email protected]>
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <[email protected]>
(This went to the cairo mailing list but it really belongs here)

----- Forwarded message -----

Carl Worth wrote:
> Oh, and also there's this comment in rsvg_cairo_new_drawing_ctx:
> 
>     /* adjust transform so that the corner of the bounding box above is
>      * at (0,0) - we compensate for this in rsvg_handle_render_cairo_sub()
>      * below */
>     state->affine[4] -= render->offset_x;
>     state->affine[5] -= render->offset_y;
> 
> Librsvg hackers, care to comment on this?

That's my code. The thing that probably goes wrong is the fiddling
with device offsets that is done in rsvg_handle_render_cairo_sub():

    cairo_surface_get_device_offset (surface, &save_dx, &save_dy);
    render = (RsvgCairoRender *) draw->render;
    cairo_surface_set_device_offset (surface,
                                     save_dx + render->offset_x,
                                     save_dy + render->offset_y);

    rsvg_node_draw ((RsvgNode *) handle->priv->treebase, draw, 0);

    cairo_surface_set_device_offset (surface, save_dx, save_dy);

Apparently with a push_group in effect changing the device offsets
like this does not affect the rendering to the group.

I'll work on a patch to fix this properly in rsvg, and hopefully
have code to show by the end of the weekend.

Is there already a bug report about this?

regards,

Bertram

----- End forwarded message -----

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
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.