[cairo] cairo_xcb_surface_create_with_xrender_format
Chris Wilson
chris at chris-wilson.co.uk
Fri Oct 16 00:57:47 PDT 2009
Excerpts from Matthew Allen's message of Fri Oct 16 06:40:50 +0100 2009:
> Hi, I'm trying to use cairo_xcb_surface_create_with_xrender_format to put
> bitmaps quickly onto the screen while honouring their alpha channel. I hope I'm
> on the right track. Anyway the format parameter is giving me some trouble, I
> don't know what to supply for the format. I googled that function and the
> various apps that use it often get their format from libraries I don't seem to
> be using or preface their code with "this is a horrible hack....".
>
> So.... whats the "official" way of doing it?
>
> The drawable is a window in my case.
It is very simple: pass the same information to cairo as you used to
create your drawable, in this case that will be the Visual. (Cairo will
map the Visual to the correct xrender format if it so needs.)
Hmm, I'm a bit worried about the statement "honouring their alpha
channel" as cairo's image format is premultiplied and this sounds like
your trying to feed incorrect information into the system and expect it
to just work.
Using cairo should be fun... If it's not you're doing it wrong. ;-)
-ickle
--
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo
mailing list