[cairo] API proposal: cairo_format_from_content and cairo_content_from_format

Behdad Esfahbod behdad at behdad.org
Tue Apr 24 14:32:03 PDT 2007

On Tue, 2007-04-24 at 22:36 +0300, Mox Soini wrote:
> (sorry for spam...)
> Is there a way to get struct XRenderPictFormat  (of Xrender.h) from a
> cairo surface?

No, that seems to be missing.  The only function in cairo-xlib-xrender.h

cairo_public cairo_surface_t *
cairo_xlib_surface_create_with_xrender_format (Display           *dpy,
                                               Drawable           drawable,
                                               Screen            *screen,
                                               XRenderPictFormat *format,
                                               int                width,
                                               int                height);

> This seems to be needed for OOo's internal processing...

Following other backends, it would be natural to add:

XRenderPictFormat *
cairo_xlib_surface_get_xrender_format (cairo_surface_t *surface);

I'll add it to the roadmap.

>       Mox 

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759

More information about the cairo mailing list