[cairo] Drawing to an X bitmap pixmap

Owen Taylor otaylor at redhat.com
Fri Mar 4 07:07:11 PST 2005


On Fri, 2005-03-04 at 16:59 +0200, Martin Pärtel wrote:
> Hello,
> 
> I'm trying to have cairo draw to an X bitmap (using the latest CVS 
> version) like this:
> 
> //...
> alpha_pixmap = XCreatePixmap(dpy, DefaultRootWindow(dpy),
> 	200, 100, 1);
> 
> alpha_surface = cairo_xlib_surface_create(
> 	dpy,
> 	alpha_pixmap,
> 	DefaultVisual(dpy, DefaultScreen(dpy)),
> 	CAIRO_FORMAT_A1,
> 	DefaultColormap(dpy, DefaultScreen(dpy))
> 	);

Try not passing in a visual/colormap. The constructor here
is confusing ... it really wants *either*
 
 a visual/colormap

Or:

 a standard format

Regards,
					Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050304/965a37d2/attachment.pgp


More information about the cairo mailing list