[cairo] Cairo drawing on sdl

Dustin Norlander dustinn at gmail.com
Thu May 5 05:51:58 PDT 2005


Hello,

I am currently working on project which uses sdl for the drawing and I
want to integrate cairo into it.  Here is my question:

the following code is from the sdl demo in cairo cvs:

cairo_set_target_image (cr, image, CAIRO_FORMAT_ARGB32, width, height, stride);
svg_cairo_render (scr, cr);
SDL_Surface *surface=SDL_CreateRGBSurfaceFrom( (void *) image, width,
height, bpp, stride, 0x00, 0x00, 0x00, 0xFF<<24);

>From my understanding cairo does all its drawing with premultiplied
color values and sdl does not handle premultiplied values.  As such
shouldn't the colors on the SDL_Surface be all messed up?  Is there
something I'm not getting?

Thanks for any help,
Dustin



More information about the cairo mailing list