On Mon, Jan 19, 2015 at 4:31 PM, Dean Jackson <[email protected]> wrote:
> Our designers at Apple often request a blending operation that is not > supported in the CSS Compositing and Blending specification: plus-darker. > You can find many examples and discussion of this mode if you Bing on the > Google. > > We’d like to add this mode to Level 2. > > Details are here: http://en.wikipedia.org/wiki/Blend_modes#Addition > > The math is pretty simple: > > R = min(0, (1 - D) + (1 - S)) > Doesn't Core Graphics implement this as a compositing operation as opposed to a real blend? Per the spec [1], a blending operation calculates the result as follows: αo x Co = αs x (1 - αb) x Cs + αs x αb x B(Cb, Cs) + (1 - αs) x αb x Cb with B being the blend mode formula. I believe CG implements plus-darker as: αo x Co = min(0, (1 - αb x Cb) + (1 - αs x Cs)) 1: http://dev.w3.org/fxtf/compositing-1/#blending
