[whatwg] <canvas> shadow compositing oddities
ebutler at mozilla.com
Sun Jul 27 12:06:09 PDT 2008
As far as I can tell, according to the spec, there is no way to
explicitly disable shadow rendering and it is always part of the drawing
model. So it defaults to fully transparent, which, for most operators,
acts the same way as disabling it.
However, following the spec's drawing model, there are a few operators
that behave rather unexpectedly if the shadow color is left at its
default value. For instance, since A in B always results in transparency
if either A or B is fully transparent, source-in will always simply
clear the clipping region to fully transparent no matter what the source
and destination are. destination-in, source-out, and destination-atop
seem to behave in similarly odd ways.
It would seem Safari isn't quite following the spec here, since it
appears to never draw shadows when the shadow color is fully transparent
or something and doesn't encounter these issues. I'm not sure that
should be the correct behavior since transparent shadows can have an
effect, but I do think there should be some way to explicitly disable
shadows, since there is no shadow color/offset that can be set such that
shadows will have no effect on any of the composite operators.
More information about the whatwg