[cairo] [RFC] Color space API (partial proposal)

Bill Spitzak spitzak at gmail.com
Sun Feb 28 11:14:38 PST 2010

Kai-Uwe Behrmann wrote:
> Am 24.02.10, 15:50 -0800 schrieb Bill Spitzak:
>> Okay I think I missed something.
>> Does a color space define how to mix the channels together? If so what 
>> should we do about Cairo compositing operations that it does not include?
> Currently ICC has no concept about mixing solour spaces at all.

I think I am not asking the question correctly.

If with new color-space-aware Cairo, I take an RGBA color in color space 
A and "over" it into a buffer with RGBA blending space B, is this how it 

  1. Convert the color from color space A to color space B.
  2. For each channel do out = color*A + out*(1-A). The mixing in 
destination space is simple linear math that never changes.

Alternative step 2 is:

  2. Call the "over" function from color space B to do the math, which 
can then do an arbitrary calculation.

Which is it?

I hope it is clear what I am asking. I think I may be running into the 
problem that the answer is "obvious" to you and therefore you think I am 
asking something else.

More information about the cairo mailing list