[whatwg] [canvas] globalCompositeOperation poorly defined
L. David Baron
dbaron at dbaron.org
Mon Jul 24 21:41:12 PDT 2006
On Friday 2006-07-21 09:07 -0700, L. David Baron wrote:
> On Friday 2006-07-21 11:14 +0300, Henri Sivonen wrote:
> > I gather that a normative reference to the Porter–Duff paper is needed:
> > http://keithp.com/~keithp/porterduff/p253-porter.pdf
>
> Perhaps, assuming that's what's been implemented, although that would
> only define 10 of the 12 operators in the spec. But that paper doesn't
> define binary operators for 'darker' and 'lighter', which seem to be
> among the less-interoperable right now. (It defines a unary 'darken'
> operator over a space of numeric parameters.)
I've written tests for the 11 operators defined in the paper, plus a
test for 'darker' that assumes Quartz's PlusDarker operator [1]:
http://dbaron.org/tests/canvas/composite-operations4
It seems like 'darker' is currently not interoperable, and might be
unlikely to become interoperable, due to different availability of
compositing operators across platforms. (Quartz has PlusDarker.
Mozilla uses the saturate operator that is provided by Cairo/libpixman
(and also by XRender), which is described in [2] and [3], but seems to
me to be quite different.)
One solution to that problem would be to remove 'darker' from the spec
rather than defining it one way or the other. Thoughts?
-David
[1] http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSCompositingOperation
[2] http://keithp.com/~keithp/render/protocol.html
[3] http://lists.freedesktop.org/archives/cairo/2005-June/004224.html
--
L. David Baron <URL: http://dbaron.org/ >
Technical Lead, Layout & CSS, Mozilla Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20060724/fc421b9d/attachment-0001.pgp>
More information about the whatwg
mailing list