[cairo] rendering to image, then to X11 display

Carl Worth cworth at cworth.org
Mon Sep 3 12:26:57 PDT 2007

On Sun, 2 Sep 2007 15:23:39 +0200, Tamas K Papp wrote:
> Given a Cairo image surface, an X11 display and window descriptor,
> what is the preferred way of displaying it on screen?  I will only be
> working with RGB surfaces, BTW.  If this is difficult, examples and
> pointers would be appreciated.

The easiest way would be to create a cairo_xlib_surface for your X11
Window, create cairo context from that, and then do:

	cairo_set_source_surface (cr, image_surface, 0, 0);
	cairo_paint (cr);

That's likely much simpler than mucking around with XPutImage

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20070903/cdcc396b/attachment.pgp 

More information about the cairo mailing list