W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2008

[whatwg] <canvas> shadow compositing oddities

From: Eric Butler <ebutler@mozilla.com>
Date: Sun, 27 Jul 2008 12:06:09 -0700
Message-ID: <488CC721.5020903@mozilla.com>
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.

-Eric Butler
Received on Sunday, 27 July 2008 12:06:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:03 UTC