[cairo] A8 images as source?
spitzak at thefoundry.co.uk
Sun Sep 14 22:56:38 PDT 2008
Doing cairo_set_source_surface(cr, anA8image) and drawing reveals that
it treats the A8 cairo_image_t as having r=g=b=0, and only the alpha
I'm wondering if instead it should instead act as though r=g=b=a. Two
- Using CAIRO_OPERATOR_SOURCE and the A8 image can be used to draw a
grayscale image. This is probably not a big deal but it was what I was
trying to do.
- Treating the A8 image this way is probably necessary if colored masks
are ever supported.
This would change the results whenever an A8 image is used as the source
(rather than for cairo_mask_surface()). For instance a normal over would
draw white instead of black (but you could use DEST_OUT or some other
operators to get black again). So I am not sure how many programs this
would break. An alternative is to add yet another image format.
More information about the cairo