[cairo] Using pre-existing textures

Robert Norris rob at cataclysm.cx
Thu Feb 7 12:04:51 PST 2008


Hi Matt,

> Is there a way to use existing image data as a texture/pattern? I'd
> like to exploit Cairo's nice XRender backend to do accelerated blits
> of those from a Gtk program.

You want cairo_image_surface_create_for_data().

I'm not familiar with GTK+, but I do know that most (all?) of its
widgets are built on top of cairo. Is there not a facility (a canvas or
something) that will let you use a GTK+ image directly?

Cheers,
Rob.


More information about the cairo mailing list