[cairo] Alpha channel for text under win32

Jason Thomas jason.thomas at onycha-blue.com
Tue Apr 12 20:10:02 PDT 2005


Hello

I have been looking at the alpha channel in the win32 surface, with the
requirement to do some alpha blending outside of cairo.

I set the target via:

	cairo_set_target_win32(pCairo, DC);

I have noticed an issue here, the primatives I am using lines/fills etc. do
generate an alpha value in the 4th byte of the DC's bitmap, but text
rendering does not.

My current fix is to set:

    surface->format = CAIRO_FORMAT_ARGB32;
in
    cairo_win32_surface_create (HDC hdc)

but this seems to drop the quality of the text a little on initial review.

Is this the best solution?
Is it possible to pass a flag into cairo_set_target_win32 to select between
CAIRO_FORMAT_ARGB32 and CAIRO_FORMAT_RGB24 for the surface formats?

Thanks,

Jason Thomas.









More information about the cairo mailing list