[cairo] CAIRO_FORMAT_ARGB32 format [ was: Re: "data" in cairo_image_surface_get_data ()

Nguyen Vu Hung vuhung16plus at gmail.com
Tue Nov 27 22:07:17 PST 2007


Hi all,

Can anyone explain how 8 bits ( one bytes ) are stored in a cairo's
surface under CAIRO_FORMAT_ARGB32 format?

For example, when I get data from a surface like:

http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t
unsigned char *data_cairo = cairo_image_surface_get_data (m_pSurface);

then, how to get A, R, G, B quantities inside *data_cairo?

# Baz said it is a endianness thingy but I don't fully understand it!

-- 
Best Regards,
Nguyen Hung Vu
vuhung16plus{remove}@gmail.dot.com
An inquisitive look at Harajuku
http://www.flickr.com/photos/vuhung/sets/72157600109218238/


More information about the cairo mailing list